From f2fb69e663ec59626c11f4dd3b194f8b842e9582 Mon Sep 17 00:00:00 2001 From: YUKI Hiroshi Date: Thu, 15 Nov 2012 16:03:24 +0900 Subject: [PATCH] Hide tab bar for only one tab window correctly (fix #406) --- modules/browser.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/modules/browser.js b/modules/browser.js index 102f94ea..bde7fac9 100644 --- a/modules/browser.js +++ b/modules/browser.js @@ -1748,7 +1748,7 @@ TreeStyleTabBrowser.prototype = { if (splitter.collapsed || splitter.getAttribute('state') != 'collapsed') { this._tabStripPlaceHolder.collapsed = splitter.collapsed = - (this.getPref('browser.tabs.autoHide') && this.getTabs(this.mTabBrowser).length == 1); + (this.getPref('browser.tabs.autoHide') && this.getExistingTabsCount() == 1); } var strip = this.tabStrip; @@ -1849,6 +1849,10 @@ TreeStyleTabBrowser.prototype = { else this.positionPinnedTabsWithDelay(null, null, aReason & this.kTABBAR_UPDATE_BY_AUTOHIDE); }, + getExistingTabsCount : function TSTBrowser_getTabsCount() + { + return this.getAllTabs(this.mTabBrowser).length - this.mTabBrowser._removingTabs.length; + }, _updateFloatingTabbarResizer : function TSTBrowser_updateFloatingTabbarResizer(aSize) {