diff --git a/modules/browser.js b/modules/browser.js index 8e7de013..850b1343 100644 --- a/modules/browser.js +++ b/modules/browser.js @@ -2086,15 +2086,19 @@ TreeStyleTabBrowser.prototype = inherit(TreeStyleTabWindow.prototype, { else this.positionPinnedTabsWithDelay(null, null, aReason & this.kTABBAR_UPDATE_BY_AUTOHIDE); + this.notifyingRenderedEvent = true; var event = d.createEvent('Events'); event.initEvent(this.kEVENT_TYPE_TABBAR_RENDERED, true, false); this.mTabBrowser.tabContainer.dispatchEvent(event); - if (!collapsed && aReason & this.kTABBAR_UPDATE_BY_AUTOHIDE) - setTimeout((function() { - if (this.browser) // ignore calling after destroyed... + setTimeout((function() { + this.notifyingRenderedEvent = false; + + if (!collapsed && + aReason & this.kTABBAR_UPDATE_BY_AUTOHIDE && + this.browser) // ignore calling after destroyed... this.scrollToTab(this.browser.selectedTab); - }).bind(this), 0); + }).bind(this), 0); }, getTabbarPlaceholderSize: function TSTBrowser_getTabbarPlaceholderSize() { diff --git a/modules/browserUIShowHideObserver.js b/modules/browserUIShowHideObserver.js index 5b71e096..1698024a 100644 --- a/modules/browserUIShowHideObserver.js +++ b/modules/browserUIShowHideObserver.js @@ -105,7 +105,9 @@ BrowserUIShowHideObserver.prototype = { onAttributeModified : function BrowserUIShowHideObserver_onAttributeModified(aMutation, aObserver) { - if (this.handlingAttrChange) + var TST = this.owner.browser.treeStyleTab; + if (this.handlingAttrChange || + TST.notifyingRenderedEvent) return; var target = aMutation.target; @@ -113,7 +115,6 @@ BrowserUIShowHideObserver.prototype = { if (target.__treestyletab_mutationObserver_lastState == state) return; - var TST = this.owner.browser.treeStyleTab; if ( // ignore modifications of each tab TST.getTabFromChild(target) || diff --git a/modules/fullscreenObserver.js b/modules/fullscreenObserver.js index 6d700317..0f351918 100644 --- a/modules/fullscreenObserver.js +++ b/modules/fullscreenObserver.js @@ -84,6 +84,7 @@ FullscreenObserver.prototype = { onSizeModeChange : function FullscreenObserver_onSizeModeChange() { this.updateToolboxPosition(); + if (!this.window.gBrowser.treeStyleTab.notifyingRenderedEvent) this.window.gBrowser.treeStyleTab.updateFloatingTabbar(TreeStyleTabConstants.kTABBAR_UPDATE_BY_WINDOW_RESIZE); }, updateToolboxPosition : function FullscreenObserver_onSizeModeChange()