diff --git a/browser/devtools/styleeditor/StyleEditorChrome.jsm b/browser/devtools/styleeditor/StyleEditorChrome.jsm index b71a8d15bbb..097fda5746b 100644 --- a/browser/devtools/styleeditor/StyleEditorChrome.jsm +++ b/browser/devtools/styleeditor/StyleEditorChrome.jsm @@ -156,11 +156,14 @@ StyleEditorChrome.prototype = { aContentWindow.addEventListener("unload", onContentUnload, false); if (aContentWindow.document.readyState == "complete") { + this._root.classList.remove("loading"); this._populateChrome(); return; } else { + this._root.classList.add("loading"); let onContentReady = function () { aContentWindow.removeEventListener("load", onContentReady, false); + this._root.classList.remove("loading"); this._populateChrome(); }.bind(this); aContentWindow.addEventListener("load", onContentReady, false); @@ -299,7 +302,7 @@ StyleEditorChrome.prototype = { }, /** - * Reset the chrome UI to an empty state. + * Reset the chrome UI to an empty and ready state. */ _resetChrome: function SEC__resetChrome() { @@ -309,6 +312,12 @@ StyleEditorChrome.prototype = { this._editors = []; this._view.removeAll(); + + // (re)enable UI + let matches = this._root.querySelectorAll("toolbarbutton,input,select"); + for (let i = 0; i < matches.length; ++i) { + matches[i].removeAttribute("disabled"); + } }, /** diff --git a/browser/devtools/styleeditor/splitview.css b/browser/devtools/styleeditor/splitview.css index cf1f68eb069..1bc27022510 100644 --- a/browser/devtools/styleeditor/splitview.css +++ b/browser/devtools/styleeditor/splitview.css @@ -46,6 +46,10 @@ box, -moz-box-pack: center; } +.loading .splitview-nav-container > .placeholder { + display: none !important; +} + .splitview-controller, .splitview-main { -moz-box-flex: 0; diff --git a/browser/devtools/styleeditor/styleeditor.xul b/browser/devtools/styleeditor/styleeditor.xul index 86c12abf935..b29f64d4079 100644 --- a/browser/devtools/styleeditor/styleeditor.xul +++ b/browser/devtools/styleeditor/styleeditor.xul @@ -54,18 +54,20 @@ persist="screenX screenY width height sizemode"> - + + label="&newButton.label;" + disabled="true"/> + label="&importButton.label;" + disabled="true"/>