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

Unified Diff: ui/webui/resources/js/cr/ui/overlay.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_item.js ('k') | ui/webui/resources/js/cr/ui/tabs.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/overlay.js
diff --git a/ui/webui/resources/js/cr/ui/overlay.js b/ui/webui/resources/js/cr/ui/overlay.js
index 7d02f13999b18a86f24cb277d565316031a5f055..c7b19e614a787b5ca1163c616757609e7558e7d1 100644
--- a/ui/webui/resources/js/cr/ui/overlay.js
+++ b/ui/webui/resources/js/cr/ui/overlay.js
@@ -50,13 +50,13 @@ cr.define('cr.ui.overlay', function() {
return;
// Close the overlay on escape.
- if (e.keyIdentifier == 'U+001B')
+ if (e.key == 'Escape')
cr.dispatchSimpleEvent(overlay, 'cancelOverlay');
// Execute the overlay's default button on enter, unless focus is on an
// element that has standard behavior for the enter key.
var forbiddenTagNames = /^(A|BUTTON|SELECT|TEXTAREA)$/;
- if (e.keyIdentifier == 'Enter' &&
+ if (e.key == 'Enter' &&
!forbiddenTagNames.test(document.activeElement.tagName)) {
var button = getDefaultButton(overlay);
if (button) {
« no previous file with comments | « ui/webui/resources/js/cr/ui/menu_item.js ('k') | ui/webui/resources/js/cr/ui/tabs.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698