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

Unified Diff: ui/webui/resources/js/cr/ui/autocomplete_list.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/link_controller.js ('k') | ui/webui/resources/js/cr/ui/command.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/autocomplete_list.js
diff --git a/ui/webui/resources/js/cr/ui/autocomplete_list.js b/ui/webui/resources/js/cr/ui/autocomplete_list.js
index b9515e44543b555aa9610e559beed226fb70f858..71e3e2fbce395b56d9a4df16f681dd859b0f21ec 100644
--- a/ui/webui/resources/js/cr/ui/autocomplete_list.js
+++ b/ui/webui/resources/js/cr/ui/autocomplete_list.js
@@ -239,8 +239,8 @@ cr.define('cr.ui', function() {
if (this.hidden)
return;
var handled = false;
- switch (event.keyIdentifier) {
- case 'U+001B': // Esc
+ switch (event.key) {
+ case 'Escape':
this.suggestions = [];
handled = true;
break;
@@ -250,11 +250,9 @@ cr.define('cr.ui', function() {
// handle the event as well.
this.handleEnterKeydown();
break;
- case 'Up':
- case 'Down':
- var newEvent = new Event(event.type);
- newEvent.keyIdentifier = event.keyIdentifier;
- this.dispatchEvent(newEvent);
+ case 'ArrowUp':
+ case 'ArrowDown':
+ this.dispatchEvent(new KeyboardEvent(event.type, event));
handled = true;
break;
}
« no previous file with comments | « ui/webui/resources/js/cr/link_controller.js ('k') | ui/webui/resources/js/cr/ui/command.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698