[realbox] Ignore arrow keys and 'Enter' when composing input with IME
When composing input text with IME featuring candidate words dialog, pressing the arrow keys produces KeyboardEvents with |isComposing| property true. Ignoring those events prevents the selection from changing in the realbox dropdown while still allowing the user to select candidate words. Also since the 'Enter' key is used to confirm a composition, that too should be ignored during IME composition. Furthermore, when composing Korean (Hangul) input with IME, an extraneous input event is fired when selection changes via the arrow keys before the input text actually changes. This causes autocomplete to be queried and the dropdown to flash producing an undesirable UX. Ignoring input events when the input text remains unchanged prevents that. Note that cases in which the user types the next character in the inline autocompletion and thus the input essentially remains unchanged are handled in onInputKeydown_(). Bug: 1154327, 1167356 Change-Id: Idf6f95af03f44a469036e60f6f8c4f161a6048c1 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2628017Reviewed-by:Esmael Elmoslimany <aee@chromium.org> Reviewed-by:
Keren Zhu <kerenzhu@chromium.org> Commit-Queue: Moe Ahmadi <mahmadi@chromium.org> Cr-Commit-Position: refs/heads/master@{#845032}
Showing
This diff is collapsed.
Please register or sign in to comment