Index: ui/file_manager/file_manager/foreground/js/naming_controller.js |
diff --git a/ui/file_manager/file_manager/foreground/js/naming_controller.js b/ui/file_manager/file_manager/foreground/js/naming_controller.js |
index eafae9e1d76cfaf6adc11400f6d6ae03246247e3..edcdcaa5e64053d88b8c00c0b7c41505b3873940 100644 |
--- a/ui/file_manager/file_manager/foreground/js/naming_controller.js |
+++ b/ui/file_manager/file_manager/foreground/js/naming_controller.js |
@@ -216,12 +216,12 @@ NamingController.prototype.onRenameInputKeyDown_ = function(event) { |
return; |
// Do not move selection or lead item in list during rename. |
- if (event.keyIdentifier == 'Up' || event.keyIdentifier == 'Down') { |
+ if (event.key === 'ArrowUp' || event.key === 'ArrowDown') { |
event.stopPropagation(); |
} |
- switch (util.getKeyModifiers(event) + event.keyIdentifier) { |
- case 'U+001B': // Escape |
+ switch (util.getKeyModifiers(event) + event.key) { |
+ case 'Escape': |
this.cancelRename_(); |
event.preventDefault(); |
break; |