Bug 514177: last tab not hidden despite *.tabs.autohide pref; r/sr=Neil
authorKarsten Düsterloh <mnyromyr@tprac.de>
Fri, 04 Sep 2009 15:43:40 +0200
changeset 3517 42a852d16314c67c323b6406ddbef7ad651e1253
parent 3516 11ee32afb19b3e0ae084d51f0310b3d4f3a0683c
child 3518 87efa6f9b69662c37d85ae6596f39cf481b4e36a
push idunknown
push userunknown
push dateunknown
bugs514177
Bug 514177: last tab not hidden despite *.tabs.autohide pref; r/sr=Neil
suite/mailnews/tabmail.xml
--- a/suite/mailnews/tabmail.xml
+++ b/suite/mailnews/tabmail.xml
@@ -607,18 +607,19 @@
             let closeFunc = tabInfo.mode.closeTab ||
                             tabInfo.mode.tabType.closeTab;
             if (closeFunc)
               closeFunc.call(tabInfo.mode.tabType, tabInfo);
 
             this.tabInfo.splice(iTab, 1);
             tabInfo.mode.tabs.splice(tabInfo.mode.tabs.indexOf(tabInfo), 1);
             this.tabContainer.removeChild(aTabNode);
+            --numTabs;
             if (this.tabContainer.selectedIndex == -1)
-              this.tabContainer.selectedIndex = (iTab == --numTabs) ? iTab - 1 : iTab;
+              this.tabContainer.selectedIndex = (iTab == numTabs) ? iTab - 1 : iTab;
             if (this.currentTabInfo == tabInfo)
               this.updateCurrentTab();
 
             if (tabInfo.panel)
             {
               this.panelContainer.removeChild(tabInfo.panel);
               delete tabInfo.panel;
             }