Bug 1409456 - Remove CtrlOrCmd+Shift+O shortcut for DevTools options;r=jryans
MozReview-Commit-ID: 3iOXwVP9UQa
--- 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+]