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

Unified Diff: third_party/WebKit/Source/devtools/front_end/ui/InplaceEditor.js

Issue 2033403005: Eradicate keyIndentifier from devtools/* (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Call KeyCodeToKeyIdentifier for unhandle key events 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: third_party/WebKit/Source/devtools/front_end/ui/InplaceEditor.js
diff --git a/third_party/WebKit/Source/devtools/front_end/ui/InplaceEditor.js b/third_party/WebKit/Source/devtools/front_end/ui/InplaceEditor.js
index 9bb9cb48a4cdee2c313c9c0694d0803f7fac8786..9c222bd2c79a9e2bab7aa3f2e947b2500f56afd5 100644
--- a/third_party/WebKit/Source/devtools/front_end/ui/InplaceEditor.js
+++ b/third_party/WebKit/Source/devtools/front_end/ui/InplaceEditor.js
@@ -180,9 +180,9 @@ WebInspector.InplaceEditor.prototype = {
event.ctrlKey && !event.shiftKey && !event.metaKey && !event.altKey;
if (isEnterKey(event) && (event.isMetaOrCtrlForTest || !isMultiline || isMetaOrCtrl))
return "commit";
- else if (event.keyCode === WebInspector.KeyboardShortcut.Keys.Esc.code || event.keyIdentifier === "U+001B")
+ else if (event.keyCode === WebInspector.KeyboardShortcut.Keys.Esc.code || event.key === "Escape")
return "cancel";
- else if (!isMultiline && event.keyIdentifier === "U+0009") // Tab key
+ else if (!isMultiline && event.key === "Tab")
return "move-" + (event.shiftKey ? "backward" : "forward");
return "";
}
@@ -197,7 +197,7 @@ WebInspector.InplaceEditor.prototype = {
event.consume(true);
} else if (result && result.startsWith("move-")) {
moveDirection = result.substring(5);
- if (event.keyIdentifier !== "U+0009")
+ if (event.key !== "Tab")
blurEventListener();
}
}

Powered by Google App Engine
This is Rietveld 408576698