Bug 1663173 - disable commands that don't need to be enabled in customize mode, r=mconley

Differential Revision: https://phabricator.services.mozilla.com/D89289
This commit is contained in:
Gijs Kruitbosch
2020-09-11 20:40:28 +00:00
parent f20c3c6779
commit d10e66f2d7
5 changed files with 103 additions and 10 deletions

View File

@@ -34,9 +34,6 @@ var CustomizationHandler = {
childNode.setAttribute("disabled", true);
}
let cmd = document.getElementById("cmd_CustomizeToolbars");
cmd.setAttribute("disabled", "true");
UpdateUrlbarSearchSplitterState();
PlacesToolbarHelper.customizeStart();
@@ -51,14 +48,11 @@ var CustomizationHandler = {
PlacesToolbarHelper.customizeDone();
XULBrowserWindow.asyncUpdateUI();
// Re-enable parts of the UI we disabled during the dialog
let menubar = document.getElementById("main-menubar");
for (let childNode of menubar.children) {
childNode.setAttribute("disabled", false);
}
let cmd = document.getElementById("cmd_CustomizeToolbars");
cmd.removeAttribute("disabled");
gBrowser.selectedBrowser.focus();