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) { |