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

Unified Diff: chrome/browser/resources/ntp4/tile_page.js

Issue 2059913002: Remove keyIdentifier usage in chrome/browser/resources/* (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix chromeos build 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: chrome/browser/resources/ntp4/tile_page.js
diff --git a/chrome/browser/resources/ntp4/tile_page.js b/chrome/browser/resources/ntp4/tile_page.js
index 1b61a1aff49f5d929ab99dd353b2c650ca6edf97..8f37a1f8248edd07b475f0f9ab63b878acf94959 100644
--- a/chrome/browser/resources/ntp4/tile_page.js
+++ b/chrome/browser/resources/ntp4/tile_page.js
@@ -705,17 +705,17 @@ cr.define('ntp', function() {
this.focusableElements_.length;
}.bind(this);
- switch (e.keyIdentifier) {
- case 'Right':
- case 'Left':
- var direction = e.keyIdentifier == 'Right' ? 1 : -1;
+ switch (e.key) {
+ case 'ArrowRight':
+ case 'ArrowLeft':
+ var direction = e.key == 'ArrowRight' ? 1 : -1;
this.focusElementIndex_ = wrap(this.focusElementIndex_ + direction);
break;
- case 'Up':
- case 'Down':
+ case 'ArrowUp':
+ case 'ArrowDown':
// Look through all focusable elements. Find the first one that is
// in the same column.
- var direction = e.keyIdentifier == 'Up' ? -1 : 1;
+ var direction = e.key == 'ArrowUp' ? -1 : 1;
var currentIndex =
Array.prototype.indexOf.call(this.focusableElements_,
this.currentFocusElement_);
« no previous file with comments | « chrome/browser/resources/ntp4/page_list_view.js ('k') | chrome/browser/resources/options/chromeos/accounts_user_name_edit.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698