Autocomplete selections include the entire cluster when appending a diacritic; breaks Thai input |
|||||||||||
Issue descriptionChrome Version : 63.0.3239.132 (Official Build) (64-bit) URLs (if applicable) : n/a Other browsers tested: n/a What steps will reproduce the problem? (1) Type "เ" "ค" "ร" "ื" (these are 4 Thai characters to be typed consecutively) (2) on my machine, it autocompletes to "เครื่องทําน้ําอุ่น" with everything after the first 2 chars highlighted. Note that I already typed 4 characters. Only the first 2 chars are NOT highlighted and the last 2 chars I typed are highlighted as part of this autocomplete. (see attached screenshot) What is the expected result? Continue to type should result in more chars to be appended after my first 4 characters that I already entered. What happens instead? If I type anything after that, the last 2 chars that I just typed will be replaced by my new character. Please provide any additional information below. Attach a screenshot if possible. The problem here has to do with Thai diacritics. In the input text above "เครื", the last char (4th char) is a diacritic that appears above the 3rd char. The autocomplete suggestion is a compound word that adds yet another diacritic on top of the 4th char. "เครื่อง..." (what comes after this word is not important). The problem is: since the 5th character onwards is part of the autocomplete, they are highlighted. However, the 5th character, which is the first of the autocomplete part, is a diacritic. Therefore, Chrome highlights all the chars in that position. These include the last 2 characters that I typed in. Therefore, if I continue to type (even just to type the same characters that the autocomplete suggests), I will replace the last 2 characters that I just typed. This behavior, once happens, made it *impossible* for me to type anything beyond the initial prefix. I have noticed this behavior for years.
,
Feb 20 2018
I don't know how Chrome decides when to autocomplete (or not)... It may actually depend on your account? In any case, in the video, you typed in gibberish...so it's imaginable that none of those would produce any legitimate auto complete. Could you try the letters I described? If you typed it in the sequence as described in my new screenshot, and there's no autocomplete, then make sure that there is nothing disabling autocompletion. If that still doesn't work, I don't know how I would force autocompletion & highlight in Chrome. They are necessary to reproduce this bug.
,
Feb 20 2018
Thank you for providing more feedback. Adding the requester to the cc list. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Feb 21 2018
,
Feb 21 2018
Thanks for the report. Sadly, this is a known issue. The omnibox doesn't know how to highlight/select text when an autocompletion combines (as with diacriticals) to text already entered.
,
Feb 21 2018
I don't think this is the same issue as 702716; that issue is about painting when a selection terminates amid a grapheme cluster (or multi-char glyph?). This issue seems to be about autocomplete setting a selection that includes the entire grapheme cluster instead of an intended portion thereof (ie. just the second diacritic). In other words, it sounds like the selection range applied from autocomplete should be logical indices 4-n, but actually winds up with logical indices 2-n. Perhaps this happens because RenderText determines that 4 is not a valid cursor position, and so adjusts the selection range to include the entire grapheme cluster). For sure, pasting "เครื่อง" in a views textfield and moving the cursor jumps over the entire "รื่" cluster. In the other issue, we certainly have a selection that ends in the middle of a grapheme cluster (or multi-char glyph), but here we are perhaps unable to set a selection that ends in the middle of this grapheme cluster (or multi-char glyph). De-duping This seems like a pretty bad usability issue; I'm sorry that it's been around so long.
,
Feb 22 2018
Yes. What msw@ described is quite accurate. It's been around for so long...like I-don't-even-remember-since-when long. It's indeed a huge usability issue. Any chance we could get a fix for this soon? Thank you!
,
Feb 23 2018
Hi, Thank you for reporting. It seems like it is more of a functional case, like user input. Looping in the Engineering Team for assistance, if any. Regards!
,
Feb 23 2018
Copying an offline discussion here (hope that's okay, Mark!): =========================== mpearson: I think before fixing it, you need to figure out what behavior you want. If a user types "a" and the omnibox system would like to inline autocomplete to "abc", where "ab" is a combined character (like a diacritical), what do you want to happen? You cannot have this inline autocompletion selection because we cannot select half of a combined character. I don't think part is possible to fix (msw@) correct me if I'm wrong. Right now we end up showing "abc" as an inline autocompletion, i.e., put the cursor before the combining character. You can imagine putting the cursor after the combining character, i.e., revising the user text to "ab" (even though they didn't type the "b") and showing "c" as an inline autocompletion. That sounds wrong too. If it's not possible to fix mid-character selections, then you're going to have to make sure that no inline autocompletion happens when the beginning of an inline autocompletion is something that combines with the end of the trailing text. That's a ranking change. =========================== msw: It should be possible to select half of a combined character... It might even be a fairly simple (or hacky) workaround to allow selections to encompass the autocompleted diacritic without encompassing the entire grapheme cluster (or whatever the proper term is for the base-character-plus-diacritics combo here), ie. select "bc", but not "a". To go down that route: I believe gfx::RenderText[HarfBuzz] or views::Textfield is widening the selection range when the ends are not valid cursor positions (see RenderText::IsValidCursorIndex and IsValidLogicalIndex). Find out where that happens; it's possible we could leave the indices as-is if they are valid logical indices, even if they aren't valid cursor indices. Otherwise, we could add a RenderText API to allow selections with more permissive range indices. I'm not sure what we can do about rendering this partial selection, perhaps that's where we'd need to expand the visual selection bounds to encompass the entire cluster? Otherwise, I'd reluctantly pursue Mark's suggestion of avoiding inline autocompletions that begin with diacritics and combine with the trailing input string, etc. (we should be able to support this...)
,
Feb 26 2018
The suggestion from msw@ (selection only includes diacritics) makes sense to me. If not, then I agree that avoiding inline autocompletions like this is an acceptable solution. Thank you for looking into this. Please let me know if I can help test or provide more information in any way.
,
Feb 26 2018
Unable to reproduce the issue on Windows 10 with chrome #63.0.3239.132, while typing the thai alphabets as provided in comment #0 Attaching the screen-short for reference.
,
Feb 26 2018
,
Feb 26 2018
Hi kkaluri@, The screenshot shows the full query (which is also badly misspelled by the way). The correct full query is "เครื่องทำน้ำอุ่น". To trigger this bug, you only need to type in the first 4 characters: "เครื". At least on my machine, once these 4 chars are entered, Chrome will instantly autocomplete it into "เครื่องทำน้ำอุ่น". See the screenshot attached to my first comment.
,
Mar 22 2018
Please let me know if there is anything I can do to help here.
,
Aug 28
Any objections to removing RVG? I want to point people who were following the Cocoa version of this bug here.
,
Aug 28
> Any objections to removing RVG? No objections.
,
Aug 28
,
Aug 28
|
|||||||||||
►
Sign in to add a comment |
|||||||||||
Comment 1 by kkaluri@chromium.org
, Feb 20 2018Components: UI>Localization Blink>Fonts
Labels: Needs-Feedback
1.3 MB
1.3 MB View Download