diff --git a/browser/base/content/tabbrowser.xml b/browser/base/content/tabbrowser.xml index 72ce1abded2..3dabb9f20de 100644 --- a/browser/base/content/tabbrowser.xml +++ b/browser/base/content/tabbrowser.xml @@ -2618,8 +2618,7 @@ 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