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

Unified Diff: third_party/WebKit/Source/devtools/front_end/elements/ElementsPanel.js

Issue 2033403005: Eradicate keyIndentifier from devtools/* (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add keyIdentifier getter/setter if keyIdentifier is not defined 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/elements/ElementsPanel.js
diff --git a/third_party/WebKit/Source/devtools/front_end/elements/ElementsPanel.js b/third_party/WebKit/Source/devtools/front_end/elements/ElementsPanel.js
index 8dd2da6b5db552c802170612519d4c2a45003fad..ad480f5b28d4ed2cdcd98904a4c6c42eded4aaeb 100644
--- a/third_party/WebKit/Source/devtools/front_end/elements/ElementsPanel.js
+++ b/third_party/WebKit/Source/devtools/front_end/elements/ElementsPanel.js
@@ -759,14 +759,14 @@ WebInspector.ElementsPanel.prototype = {
*/
function handleUndoRedo(treeOutline)
{
- if (WebInspector.KeyboardShortcut.eventHasCtrlOrMeta(event) && !event.shiftKey && event.keyIdentifier === "U+005A") { // Z key
+ if (WebInspector.KeyboardShortcut.eventHasCtrlOrMeta(event) && event.key === "z") { // lower case Z key
caseq 2016/06/10 18:59:11 so what happens when user has CAPS LOCK on?
dtapuska 2016/06/10 20:25:43 Done.
treeOutline.domModel().undo();
event.handled = true;
return;
}
- var isRedoKey = WebInspector.isMac() ? event.metaKey && event.shiftKey && event.keyIdentifier === "U+005A" : // Z key
- event.ctrlKey && event.keyIdentifier === "U+0059"; // Y key
+ var isRedoKey = WebInspector.isMac() ? event.metaKey && event.key === "Z" : // upper case Z key
+ event.ctrlKey && event.key === "y"; // lower case Y key
if (isRedoKey) {
treeOutline.domModel().redo();
event.handled = true;

Powered by Google App Engine
This is Rietveld 408576698