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

Unified Diff: ui/webui/resources/js/cr/ui/menu.js

Issue 2104103002: Convert Event#keyIdentifier (deprecated) to Event#key (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Patch file manager test Created 4 years, 5 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/webui/resources/js/cr/ui/menu.js
diff --git a/ui/webui/resources/js/cr/ui/menu.js b/ui/webui/resources/js/cr/ui/menu.js
index abcb79c71906f6a6fb1f83f7617f183d54699281..fbf0522c48b1466fe1004491e1bee3ba15f5548b 100644
--- a/ui/webui/resources/js/cr/ui/menu.js
+++ b/ui/webui/resources/js/cr/ui/menu.js
@@ -241,17 +241,17 @@ cr.define('cr.ui', function() {
self.selectedIndex = i;
}
- switch (e.keyIdentifier) {
- case 'Down':
+ switch (e.key) {
+ case 'ArrowDown':
selectNextAvailable(1);
this.focusSelectedItem();
return true;
- case 'Up':
+ case 'ArrowUp':
selectNextAvailable(-1);
this.focusSelectedItem();
return true;
case 'Enter':
- case 'U+0020': // Space
+ case ' ':
if (item) {
// Store |contextElement| since it'll be removed when handling the
// 'activate' event.
« no previous file with comments | « ui/webui/resources/js/cr/ui/list_selection_controller.js ('k') | ui/webui/resources/js/cr/ui/menu_button.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698