diff --git a/browser/base/content/browser.js b/browser/base/content/browser.js index d837e723ac1d..7712b095d431 100644 --- a/browser/base/content/browser.js +++ b/browser/base/content/browser.js @@ -5331,8 +5331,6 @@ function setToolbarVisibility(toolbar, isVisible) { var TabsOnTop = { init: function TabsOnTop_init() { - this._initialized = true; - this.syncUI(); Services.prefs.addObserver(this._prefName, this, false); }, @@ -5345,9 +5343,6 @@ var TabsOnTop = { }, syncUI: function () { - if (!this._initialized) - return; - let userEnabled = Services.prefs.getBoolPref(this._prefName); let enabled = userEnabled && gBrowser.tabContainer.visible; diff --git a/browser/base/content/tabbrowser.xml b/browser/base/content/tabbrowser.xml index 4c330c9d3127..bddb0ee1cb8b 100644 --- a/browser/base/content/tabbrowser.xml +++ b/browser/base/content/tabbrowser.xml @@ -2779,9 +2779,7 @@ Services.prefs.addObserver("browser.tabs.", this._prefObserver, false); window.addEventListener("resize", this, false); - - this.updateVisibility(); - this._propagateVisibility(); + window.addEventListener("load", this, false); ]]> @@ -2841,15 +2839,19 @@ this.parentNode && this.parentNode.localName == "toolbar" ? this.parentNode : this; ]]> + false + @@ -3080,6 +3082,9 @@