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

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

Issue 2059913002: Remove keyIdentifier usage in chrome/browser/resources/* (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove a few tests that were failing because webui hasn't changed yet 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/nav_dot.js
diff --git a/chrome/browser/resources/ntp4/nav_dot.js b/chrome/browser/resources/ntp4/nav_dot.js
index 964be968689b13a4e4dc86f230571b0868123c86..7703f31639d2ce5d8a87286fd7b92d5f2e87178b 100644
--- a/chrome/browser/resources/ntp4/nav_dot.js
+++ b/chrome/browser/resources/ntp4/nav_dot.js
@@ -114,7 +114,7 @@ cr.define('ntp', function() {
* @param {Event} e The KeyboardEvent.
*/
onKeyDown_: function(e) {
- if (e.keyIdentifier == 'Enter') {
+ if (e.key == 'Enter') {
this.onClick_(e);
e.stopPropagation();
}
@@ -164,8 +164,8 @@ cr.define('ntp', function() {
* @private
*/
onInputKeyDown_: function(e) {
- switch (e.keyIdentifier) {
- case 'U+001B': // Escape cancels edits.
+ switch (e.key) {
+ case 'Escape': // Escape cancels edits.
this.input_.value = this.displayTitle;
case 'Enter': // Fall through.
this.input_.blur();

Powered by Google App Engine
This is Rietveld 408576698