Bug 586666 - When new tab is opened, close button of inactive tab disappears; r=gavin.sharp approval2.0=gavin.sharp a=blocking-beta5+
authorDão Gottwald <dao@mozilla.com>
Mon, 16 Aug 2010 16:43:04 -0400
changeset 50686 235a99fd59fda60eeffe99952a24fe4978121163
parent 50685 c8dc4dd369ee9b8668685d3a2011473cde7390f1
child 50687 50334c9ac182310db9dc4a1ab2a1c453b3610d63
push idunknown
push userunknown
push dateunknown
reviewersgavin, blocking-beta5
bugs586666
milestone2.0b4pre
Bug 586666 - When new tab is opened, close button of inactive tab disappears; r=gavin.sharp approval2.0=gavin.sharp a=blocking-beta5+
browser/base/content/tabbrowser.xml
--- a/browser/base/content/tabbrowser.xml
+++ b/browser/base/content/tabbrowser.xml
@@ -2613,18 +2613,17 @@
               this.setAttribute("closebuttons", "noclose");
             else
               this.setAttribute("closebuttons", "activetab");
             break;
           case 1:
             if (this.childNodes.length == 1 && this._closeWindowWithLastTab)
               this.setAttribute("closebuttons", "noclose");
             else {
-              // Grab the last tab for size comparison
-              let tab = this.tabbrowser.visibleTabs.pop();
+              let tab = this.tabbrowser.visibleTabs[this.tabbrowser._numPinnedTabs];
               if (tab && tab.getBoundingClientRect().width > this.mTabClipWidth)
                 this.setAttribute("closebuttons", "alltabs");
               else
                 this.setAttribute("closebuttons", "activetab");
             }
             break;
           case 2:
           case 3: