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

Unified Diff: ui/webui/resources/js/cr/ui/focus_row.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/focus_grid.js ('k') | ui/webui/resources/js/cr/ui/list_selection_controller.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/focus_row.js
diff --git a/ui/webui/resources/js/cr/ui/focus_row.js b/ui/webui/resources/js/cr/ui/focus_row.js
index a545d14d7be535be01233dbee25fdcbb88e37ce9..e612cbc1dbd51b8c4dbeabe8863f282615fb7d8c 100644
--- a/ui/webui/resources/js/cr/ui/focus_row.js
+++ b/ui/webui/resources/js/cr/ui/focus_row.js
@@ -271,13 +271,13 @@ cr.define('cr.ui', function() {
var index = -1;
- if (e.keyIdentifier == 'Left')
+ if (e.key == 'ArrowLeft')
index = elementIndex + (isRTL() ? 1 : -1);
- else if (e.keyIdentifier == 'Right')
+ else if (e.key == 'ArrowRight')
index = elementIndex + (isRTL() ? -1 : 1);
- else if (e.keyIdentifier == 'Home')
+ else if (e.key == 'Home')
index = 0;
- else if (e.keyIdentifier == 'End')
+ else if (e.key == 'End')
index = elements.length - 1;
var elementToFocus = elements[index];
« no previous file with comments | « ui/webui/resources/js/cr/ui/focus_grid.js ('k') | ui/webui/resources/js/cr/ui/list_selection_controller.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698