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

Unified Diff: ui/webui/resources/js/cr/ui/menu_button.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
« no previous file with comments | « ui/webui/resources/js/cr/ui/menu.js ('k') | ui/webui/resources/js/cr/ui/menu_item.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/webui/resources/js/cr/ui/menu_button.js
diff --git a/ui/webui/resources/js/cr/ui/menu_button.js b/ui/webui/resources/js/cr/ui/menu_button.js
index 3a7bae5fc7897f71693d938c465f66fbbe4299f7..ff6c256045cfd448f91193e8254ffb2992c97d5b 100644
--- a/ui/webui/resources/js/cr/ui/menu_button.js
+++ b/ui/webui/resources/js/cr/ui/menu_button.js
@@ -266,20 +266,19 @@ cr.define('cr.ui', function() {
* Handles the keydown event for the menu button.
*/
handleKeyDown: function(e) {
- switch (e.keyIdentifier) {
- case 'Down':
- case 'Up':
+ switch (e.key) {
+ case 'ArrowDown':
+ case 'ArrowUp':
if (!this.respondToArrowKeys)
break;
case 'Enter':
- case 'U+0020': // Space
+ case ' ':
if (!this.isMenuShown())
this.showMenu(true);
e.preventDefault();
break;
- case 'Esc':
- case 'U+001B': // Maybe this is remote desktop playing a prank?
- case 'U+0009': // Tab
+ case 'Escape':
+ case 'Tab':
this.hideMenu();
break;
}
« no previous file with comments | « ui/webui/resources/js/cr/ui/menu.js ('k') | ui/webui/resources/js/cr/ui/menu_item.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698