Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(299)

Unified Diff: ui/file_manager/file_manager/foreground/js/naming_controller.js

Issue 1994563002: Remove the use of KeyEvent.keyIdentifier. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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;

Powered by Google App Engine
This is Rietveld 408576698