Commit a1c4c0ce authored by fukino's avatar fukino Committed by Commit bot

Files.app: Cancel all selections on ESC key.

BUG=459462
TEST=check that ESC cancels selections on list/grid view, and that pressing ESC while renaming doesn't cancel selection.

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

Cr-Commit-Position: refs/heads/master@{#318856}
parent fac6a2d4
...@@ -1127,6 +1127,13 @@ filelist.handleKeyDown = function(e) { ...@@ -1127,6 +1127,13 @@ filelist.handleKeyDown = function(e) {
return; return;
} }
// Esc
if (e.keyCode === 27 && !e.ctrlKey && !e.shiftKey) {
sm.unselectAll();
e.preventDefault();
return;
}
// Space // Space
if (e.keyCode == SPACE_KEY_CODE) { if (e.keyCode == SPACE_KEY_CODE) {
if (leadIndex != -1) { if (leadIndex != -1) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment