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

Issue 644071 link

Starred by 3 users

Issue metadata

Status: Verified
Owner:
Closed: Sep 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 1
Type: Bug-Regression



Sign in to add a comment

Pressing enter to choose conversion suggestion fixes the file name

Project Member Reported by yawano@chromium.org, Sep 5 2016

Issue description

Version: M54 Dev
OS: Chrome OS

What steps will reproduce the problem?
(1) Change language to which requires conversion with IME. e.g. Japanese.
(2) Try to type some word, and press enter to select conversion suggestion to select it.
(3) File name is fixed.

What is the expected output?
File name should not be fixed by pressing enter to select conversion suggestion.

What do you see instead?
File name is fixed.
 
Labels: -Type-Bug -Pri-2 M-54 Pri-1 Type-Bug-Regression
It used to work fine in M53. It seems a recent regression.
Labels: Needs-Bisect ReleaseBlock-Stable
Cc: nona@chromium.org
Maybe nona@ san happen to have some ideas?

Comment 4 by nona@chromium.org, Sep 5 2016

Looks like this is a regression from https://codereview.chromium.org/1994563002/diff/40001/ui/file_manager/file_manager/foreground/js/main_window_component.js?context=10&column_width=80&tab_spaces=8

With above change, now JavaScript looks KeyboardEvent.key instead of KeyboardEvent.keyIdentifier, but the value of them are different when the IME processes the key event. The KeyboardEvent.keyIdentifier is U+00E5 which corresponds to VKEY_PROCESSKEY, but KeyboardEvent.key is Enter.

Attaching a screenshot of the log of key event.
The value of e.key and e.keyCode is not consistent when the IME consumes the KeyboardEvent.

Thus, JavaScript commits the file name update even if the IME processes the Enter Key.


I think this is an issue of event translation in Chrome rather than File's app issue, but you may want to introduce workaround by using KeyboardEvent.keyCode even it is also deprecated now.

Comment 5 by nona@chromium.org, Sep 5 2016

consumed_keyevent_bad.png
209 KB View Download

Comment 6 by nona@chromium.org, Sep 5 2016

Cc: shuchen@chromium.org suzhe@chromium.org
+shuchen, suzhe

Shu, James, have you changed any VKEY_PROCESSKEY translation logic recently?
Thank you nona san!
For M54, we can work around this issue by checking e.keyCode.

However, it should be a problem that we can't know whether a keyevent is consumed or not without depending on a deprecated property.
It'd be great if we can get a proper fix asap.
The code about VKEY_PROCESSKEY has a little change & revert back a couple of months ago:
https://codereview.chromium.org/2072213003/
https://codereview.chromium.org/2120133002/

And I don't think those affect this issue.

Comment 9 by nona@chromium.org, Sep 6 2016

Hmm, then looks like this behavior is not changed for a long time.
At least, I saw the same behavior in M52.
We need to check DOM Keyevent specification first.

Anyway, we may need to create another issue for tracking VKEY_PROCESSKEY.

Comment 10 by nona@chromium.org, Sep 6 2016

Filed an issue for DOM event.
 http://crbug.com/644140 
Labels: -Needs-Bisect
Project Member

Comment 12 by bugdroid1@chromium.org, Sep 7 2016

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

commit bb7c1663e15a122a64f94f5fac7ca8fdbdf7ec06
Author: fukino <fukino@chromium.org>
Date: Wed Sep 07 09:22:43 2016

Ignore key events in renaming inputs when the keyCode is VK_PROCESSKEY(229).

When the key events are consumed by IME, the keyCode in KeyboardEvent.keyCode is
VK_PROCESSKEY, but KeyboardEvent.key can be the original key, like 'Enter'.
As a workaround, we look into keyCode to ignore the consumed key events not to
commit unwanted changes in rename inputs, although the keyCode is deprecated.

BUG= 644071 
TEST=manually tested using the repro steps described in the bug.

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

[modify] https://crrev.com/bb7c1663e15a122a64f94f5fac7ca8fdbdf7ec06/ui/file_manager/file_manager/foreground/js/directory_tree_naming_controller.js
[modify] https://crrev.com/bb7c1663e15a122a64f94f5fac7ca8fdbdf7ec06/ui/file_manager/file_manager/foreground/js/naming_controller.js

Labels: Merge-Request-54

Comment 14 by dimu@chromium.org, Sep 8 2016

Labels: -Merge-Request-54 Merge-Approved-54 Hotlist-Merge-Approved
Your change meets the bar and is auto-approved for M54 (branch: 2840)
Project Member

Comment 15 by bugdroid1@chromium.org, Sep 8 2016

Labels: -merge-approved-54 merge-merged-2840
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/5b94799717dd554ff75a9dac122753bfd5f3ed65

commit 5b94799717dd554ff75a9dac122753bfd5f3ed65
Author: Naoki Fukino <fukino@chromium.org>
Date: Thu Sep 08 08:52:40 2016

Ignore key events in renaming inputs when the keyCode is VK_PROCESSKEY(229).

When the key events are consumed by IME, the keyCode in KeyboardEvent.keyCode is
VK_PROCESSKEY, but KeyboardEvent.key can be the original key, like 'Enter'.
As a workaround, we look into keyCode to ignore the consumed key events not to
commit unwanted changes in rename inputs, although the keyCode is deprecated.

BUG= 644071 
TEST=manually tested using the repro steps described in the bug.
TBR=nona@chromium.org

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

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

Cr-Commit-Position: refs/branch-heads/2840@{#231}
Cr-Branched-From: 1ae106dbab4bddd85132d5b75c670794311f4c57-refs/heads/master@{#414607}

[modify] https://crrev.com/5b94799717dd554ff75a9dac122753bfd5f3ed65/ui/file_manager/file_manager/foreground/js/directory_tree_naming_controller.js
[modify] https://crrev.com/5b94799717dd554ff75a9dac122753bfd5f3ed65/ui/file_manager/file_manager/foreground/js/naming_controller.js

Status: Fixed (was: Available)
Status: Verified (was: Fixed)
Changed keyboard to Japanese for US Keyboard
Tried to rename a file in the Files app
Type a few characters 
See suggestion dropdown
Press down arrow to select
Press enter 
You can continue typing a file name
Project Member

Comment 18 by bugdroid1@chromium.org, Oct 27 2016

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

commit 5b94799717dd554ff75a9dac122753bfd5f3ed65
Author: Naoki Fukino <fukino@chromium.org>
Date: Thu Sep 08 08:52:40 2016

Ignore key events in renaming inputs when the keyCode is VK_PROCESSKEY(229).

When the key events are consumed by IME, the keyCode in KeyboardEvent.keyCode is
VK_PROCESSKEY, but KeyboardEvent.key can be the original key, like 'Enter'.
As a workaround, we look into keyCode to ignore the consumed key events not to
commit unwanted changes in rename inputs, although the keyCode is deprecated.

BUG= 644071 
TEST=manually tested using the repro steps described in the bug.
TBR=nona@chromium.org

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

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

Cr-Commit-Position: refs/branch-heads/2840@{#231}
Cr-Branched-From: 1ae106dbab4bddd85132d5b75c670794311f4c57-refs/heads/master@{#414607}

[modify] https://crrev.com/5b94799717dd554ff75a9dac122753bfd5f3ed65/ui/file_manager/file_manager/foreground/js/directory_tree_naming_controller.js
[modify] https://crrev.com/5b94799717dd554ff75a9dac122753bfd5f3ed65/ui/file_manager/file_manager/foreground/js/naming_controller.js

Sign in to add a comment