New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 622158 link

Starred by 3 users

Issue metadata

Status: Fixed
Owner:
Closed: Jul 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 1
Type: Bug-Regression



Sign in to add a comment

IME Candidate window disappears when hitting "Tab" key

Reported by haraw...@gmail.com, Jun 22 2016

Issue description

UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2774.3 Safari/537.36

Steps to reproduce the problem:
1. Set IME mode to Hiranagana (it is reproduced with both Kotoeri and Google Japanese Input)
2. In a textarea or a text field on a web page, type "kabu". The candidate window will be displayed (might depend on the setting).
3. Press tab key.

What is the expected behavior?
The selection moves to the next candidate in the candidate window.

What went wrong?
Focus is moved to the next element on the page.

Did this work before? Yes Not so sure. But it can't be too long because this is a blocker.

Chrome version: 53.0.2774.3  Channel: canary
OS Version: OS X 10.11.5
Flash Version: Shockwave Flash 22.0 r0

The symptom is the same as the issue reported here https://bugs.chromium.org/p/chromium/issues/detail?id=620794
 
Components: -UI UI>Input>Text>IME
Status: Untriaged (was: Unconfirmed)
Tagging UI>Input>Text>IME for triage.
Cc: songsuk@chromium.org nona@chromium.org
Owner: shuchen@chromium.org
Status: Assigned (was: Untriaged)
Cc: tapted@chromium.org
Labels: -Type-Bug -Pri-2 ReleaseBlock-Stable M-53 Pri-1 Type-Bug-Regression
Summary: IME Candidate window disappears when hitting "Tab" key (was: Japanese Candidate window disappears when hitting "Tab" key)
Also repro'ed with Chinese Pinyin IME.

tapted@, do you have any ideas?
I'm wondering whether there are changes recently for IMF@Mac?

Btw, this only repros on web input field, not repro on native input field (e.g. omnibox).

Cc: karandeepb@chromium.org
Labels: Needs-Bisect
Nothing comes to mind - karandeepb@ did some small refactors, but I don't think it affected WebContents in an interesting way.
Labels: -Needs-Bisect
Cc: shuchen@chromium.org
Owner: dtapu...@chromium.org
Reverting r399369 locally fixes the problem for me.

author	dtapuska <dtapuska@chromium.org>	Sat Jun 11 16:06:19 2016
Handle the "key" field as opposed to keyIdentifier field.

keyIdentifier will be deprecated soon so we need to move over to the
standardized identifier.

Approved Intent to Remove: https://groups.google.com/a/chromium.org/d/msg/blink-dev/fqnFyoDCOaA/s4WIxZPqAAAJ

BUG= 607349 

Review-Url: https://codereview.chromium.org/2045603002
Cr-Commit-Position: refs/heads/master@{#399369}
shuchen@ do you have any ideas? I presume the IME is not consuming the tab as it should be and passing it to the webview which then causes a focus event. Perhaps the IME use to pass the event but it might not have been populated correctly. I'm off today and this weekend for a national holiday but will look at it Monday if you don't have any ideas.
The IME will consume the TAB key. However, before IME consume any keys, the IME will respect that whether the app wants to allow IME to continue processing it.
For example, considering a gaming web app which has a settings UI to allow users to configure the shortcut keys. An input field shows which key is mapped to UP key, and if user presses "W", the input field will show "W", no matter whether there is an IME activated (e.g. Chinese Pinyin IME).
In such web app, it should listen onkeydown and do event.preventDefault() if the keyCode is 229. Therefore, the IME won't work at all.

I'm guessing that when IMF asks that whether Chrome wants to handle the VKEY_PROCESSKEY event (transformed from the TAB key), Chrome processes the TAB key anyway and causes the focus change.

Can your code detect the VKEY code instead of DomKey/DomCode?

FYI. Another similar  issue 622158  may shares the same root cause of this.

The  issue 622158  is for Chrome OS, and I used to apply a workaround but it broke dead key scenario.

It might be will check tomorrow. I think the real fix might be to set a isComposing flag on the input event and not do the default tab action when isComposing is on. 

IsComposing is part of the ui events spec that we haven't implemented yet.  
Project Member

Comment 13 by bugdroid1@chromium.org, Jul 5 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/febbb09d4df69afde4e6294a842a02e90a9cabdf

commit febbb09d4df69afde4e6294a842a02e90a9cabdf
Author: dtapuska <dtapuska@chromium.org>
Date: Tue Jul 05 03:58:01 2016

Don't perform the default action when keyCode is 229.

The keyCode of 229 signifies that this event is being dispatched during
an IME composition. Previously keyIdentifier ended up being ProcessKey but
with the converstion to key events this started to be processed.

Put a conditional around the event to ensure that keyCode == 229 events
are discarded. This will eventually be replaced with the isComposing
flag that should be added to KeyboardEvent.

BUG= 620794 ,  622158 

Review-Url: https://codereview.chromium.org/2121843002
Cr-Commit-Position: refs/heads/master@{#403737}

[modify] https://crrev.com/febbb09d4df69afde4e6294a842a02e90a9cabdf/third_party/WebKit/Source/core/input/KeyboardEventManager.cpp

I could verify the fix in 54.0.2789.0 (Mac). Thank you guys :-)
Labels: Merge-Request-53

Comment 16 by dimu@google.com, Jul 6 2016

Labels: -Merge-Request-53 Merge-Approved-53 Hotlist-Merge-Approved
Your change meets the bar and is auto-approved for M53 (branch: 2785)
Project Member

Comment 17 by bugdroid1@chromium.org, Jul 6 2016

Labels: -merge-approved-53 merge-merged-2785
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/be5ae235b1fd6fcbe8bae4500e100ae9eacca8db

commit be5ae235b1fd6fcbe8bae4500e100ae9eacca8db
Author: Dave Tapuska <dtapuska@chromium.org>
Date: Wed Jul 06 13:36:28 2016

Don't perform the default action when keyCode is 229.

The keyCode of 229 signifies that this event is being dispatched during
an IME composition. Previously keyIdentifier ended up being ProcessKey but
with the converstion to key events this started to be processed.

Put a conditional around the event to ensure that keyCode == 229 events
are discarded. This will eventually be replaced with the isComposing
flag that should be added to KeyboardEvent.

BUG= 620794 ,  622158 

Review-Url: https://codereview.chromium.org/2121843002
Cr-Commit-Position: refs/heads/master@{#403737}
(cherry picked from commit febbb09d4df69afde4e6294a842a02e90a9cabdf)

Review URL: https://codereview.chromium.org/2127843002 .

Cr-Commit-Position: refs/branch-heads/2785@{#26}
Cr-Branched-From: 68623971be0cfc492a2cb0427d7f478e7b214c24-refs/heads/master@{#403382}

[modify] https://crrev.com/be5ae235b1fd6fcbe8bae4500e100ae9eacca8db/third_party/WebKit/Source/core/input/KeyboardEventManager.cpp

Status: Fixed (was: Assigned)
Labels: Needs-Feedback
Verified the issue on Mac 10.11.5 using 53.0.2785.8.
dtapuska@ : Could you please review the attached screen cast and let us know if anything is missed here.
622158_July_7.mp4
582 KB View Download
Labels: Hotlist-Input-Dev

Sign in to add a comment