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

Unified Diff: ui/webui/resources/js/cr/ui/focus_grid.js

Issue 2104103002: Convert Event#keyIdentifier (deprecated) to Event#key (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add a few more stragglers Created 4 years, 6 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
Index: ui/webui/resources/js/cr/ui/focus_grid.js
diff --git a/ui/webui/resources/js/cr/ui/focus_grid.js b/ui/webui/resources/js/cr/ui/focus_grid.js
index 4eda10b6af0d4363ecad551917235c541c8c72ac..cd3205ef2f7d6d300b15cabba0d469b8e782373a 100644
--- a/ui/webui/resources/js/cr/ui/focus_grid.js
+++ b/ui/webui/resources/js/cr/ui/focus_grid.js
@@ -53,13 +53,13 @@ cr.define('cr.ui', function() {
var newRow = -1;
- if (e.keyIdentifier == 'Up')
+ if (e.key == 'ArrowUp')
newRow = rowIndex - 1;
- else if (e.keyIdentifier == 'Down')
+ else if (e.key == 'ArrowDown')
newRow = rowIndex + 1;
- else if (e.keyIdentifier == 'PageUp')
+ else if (e.key == 'PageUp')
newRow = 0;
- else if (e.keyIdentifier == 'PageDown')
+ else if (e.key == 'PageDown')
newRow = this.rows.length - 1;
var rowToFocus = this.rows[newRow];

Powered by Google App Engine
This is Rietveld 408576698