Issue metadata
Sign in to add a comment
|
Pressing enter to choose conversion suggestion fixes the file name |
||||||||||||||||||||||
Issue descriptionVersion: 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.
,
Sep 5 2016
,
Sep 5 2016
Maybe nona@ san happen to have some ideas?
,
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.
,
Sep 5 2016
,
Sep 5 2016
+shuchen, suzhe Shu, James, have you changed any VKEY_PROCESSKEY translation logic recently?
,
Sep 6 2016
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.
,
Sep 6 2016
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.
,
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.
,
Sep 6 2016
Filed an issue for DOM event. http://crbug.com/644140
,
Sep 7 2016
,
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
,
Sep 7 2016
,
Sep 8 2016
Your change meets the bar and is auto-approved for M54 (branch: 2840)
,
Sep 8 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
,
Sep 8 2016
,
Oct 19 2016
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
,
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 |
|||||||||||||||||||||||
Comment 1 by fukino@chromium.org
, Sep 5 2016