Bug 1409456 - Remove CtrlOrCmd+Shift+O shortcut for DevTools options;r=jryans draft
authorJulian Descottes <jdescottes@mozilla.com>
Fri, 06 Apr 2018 11:50:09 +0200
changeset 778397 fcf64c1cc74c8ee1a63ba6e566bedbd7e95a5082
parent 777984 110f32790d38a258cab722064aae40736478ef51
push id105488
push userjdescottes@mozilla.com
push dateFri, 06 Apr 2018 09:52:36 +0000
reviewersjryans
bugs1409456
milestone61.0a1
Bug 1409456 - Remove CtrlOrCmd+Shift+O shortcut for DevTools options;r=jryans MozReview-Commit-ID: 3iOXwVP9UQa
devtools/client/framework/test/browser_toolbox_options.js
devtools/client/framework/toolbox.js
devtools/client/locales/en-US/toolbox.properties
--- a/devtools/client/framework/test/browser_toolbox_options.js
+++ b/devtools/client/framework/test/browser_toolbox_options.js
@@ -82,29 +82,22 @@ async function testSelectTool() {
   ok(true, "Toolbox selected via selectTool method");
 }
 
 async function testOptionsShortcut() {
   info("Selecting another tool, then reselecting options panel with keyboard.");
 
   await toolbox.selectTool("webconsole");
   is(toolbox.currentToolId, "webconsole", "webconsole is selected");
-  synthesizeKeyShortcut(L10N.getStr("toolbox.options.key"));
-  is(toolbox.currentToolId, "options", "Toolbox selected via shortcut key (1)");
-  synthesizeKeyShortcut(L10N.getStr("toolbox.options.key"));
-  is(toolbox.currentToolId, "webconsole", "webconsole is selected (1)");
-
-  await toolbox.selectTool("webconsole");
-  is(toolbox.currentToolId, "webconsole", "webconsole is selected");
+  synthesizeKeyShortcut(L10N.getStr("toolbox.help.key"));
+  is(toolbox.currentToolId, "options", "Toolbox selected via shortcut key");
   synthesizeKeyShortcut(L10N.getStr("toolbox.help.key"));
-  is(toolbox.currentToolId, "options", "Toolbox selected via shortcut key (2)");
-  synthesizeKeyShortcut(L10N.getStr("toolbox.options.key"));
-  is(toolbox.currentToolId, "webconsole", "webconsole is reselected (2)");
+  is(toolbox.currentToolId, "webconsole", "webconsole is reselected");
   synthesizeKeyShortcut(L10N.getStr("toolbox.help.key"));
-  is(toolbox.currentToolId, "options", "Toolbox selected via shortcut key (2)");
+  is(toolbox.currentToolId, "options", "Toolbox selected via shortcut key");
 }
 
 async function testOptions() {
   let tool = toolbox.getPanel("options");
   panelWin = tool.panelWin;
   let prefNodes = tool.panelDoc.querySelectorAll(
     "input[type=checkbox][data-pref]");
 
--- a/devtools/client/framework/toolbox.js
+++ b/devtools/client/framework/toolbox.js
@@ -814,20 +814,17 @@ Toolbox.prototype = {
       // Flip back to the last used panel if we are already
       // on the options panel.
       if (this.currentToolId === "options" &&
           gDevTools.getToolDefinition(this.lastUsedToolId)) {
         this.selectTool(this.lastUsedToolId);
       } else {
         this.selectTool("options");
       }
-      // Prevent the opening of bookmarks window on toolbox.options.key
-      event.preventDefault();
     };
-    this.shortcuts.on(L10N.getStr("toolbox.options.key"), selectOptions);
     this.shortcuts.on(L10N.getStr("toolbox.help.key"), selectOptions);
   },
 
   _splitConsoleOnKeypress: function(e) {
     if (e.keyCode === KeyCodes.DOM_VK_ESCAPE) {
       this.toggleSplitConsole();
       // If the debugger is paused, don't let the ESC key stop any pending
       // navigation.
--- a/devtools/client/locales/en-US/toolbox.properties
+++ b/devtools/client/locales/en-US/toolbox.properties
@@ -93,20 +93,16 @@ toolbox.viewCssSourceInStyleEditor.label
 # LOCALIZATION NOTE (toolbox.viewJsSourceInDebugger.label)
 # Used as a message in either tooltips or contextual menu items to open the
 # corresponding URL as a js file in the Debugger tool.
 # DEV NOTE: Mostly used wherever toolbox.viewSourceInDebugger is used.
 toolbox.viewJsSourceInDebugger.label=Open File in Debugger
 
 toolbox.resumeOrderWarning=Page did not resume after the debugger was attached. To fix this, please close and re-open the toolbox.
 
-# LOCALIZATION NOTE (toolbox.options.key)
-# Key shortcut used to open the options panel
-toolbox.options.key=CmdOrCtrl+Shift+O
-
 # LOCALIZATION NOTE (toolbox.help.key)
 # Key shortcut used to open the options panel
 toolbox.help.key=F1
 
 # LOCALIZATION NOTE (toolbox.nextTool.key)
 # Key shortcut used to select the next tool
 toolbox.nextTool.key=CmdOrCtrl+]