diff --git a/application/basilisk/base/content/tabbrowser.xml b/application/basilisk/base/content/tabbrowser.xml index 52c51db69..e5715638c 100644 --- a/application/basilisk/base/content/tabbrowser.xml +++ b/application/basilisk/base/content/tabbrowser.xml @@ -5476,6 +5476,9 @@ 2) { // This is an optimization to avoid layout flushes by calling // getBoundingClientRect() when we just opened a second tab. In diff --git a/application/basilisk/components/nsBrowserGlue.js b/application/basilisk/components/nsBrowserGlue.js index 8814a8aaf..ad511ab27 100644 --- a/application/basilisk/components/nsBrowserGlue.js +++ b/application/basilisk/components/nsBrowserGlue.js @@ -1279,8 +1279,6 @@ BrowserGlue.prototype = { } this._saveSession = false; - if (pagecount < 2) - return; if (!aQuitType) aQuitType = "quit"; diff --git a/application/palemoon/base/content/tabbrowser.xml b/application/palemoon/base/content/tabbrowser.xml index cbe029af0..f377bf28e 100644 --- a/application/palemoon/base/content/tabbrowser.xml +++ b/application/palemoon/base/content/tabbrowser.xml @@ -3819,11 +3819,17 @@ // when closing the window with the last tab, then we should check // if (numTabs == 1 && this._closeWindowWithLastTab) here and set // this.setAttribute("closebuttons", "hidden") appropriately + if (numTabs == 1 && this._closeWindowWithLastTab) + this.setAttribute("closebuttons", "hidden"); + else this.setAttribute("closebuttons", "activetab"); break; case 1: if (numTabs == 1) { // See remark about potentially hiding the close tab button, above. + if (this._closeWindowWithLastTab) + this.setAttribute("closebuttons", "hidden"); + else this.setAttribute("closebuttons", "alltabs"); } else if (numTabs == 2) { // This is an optimization to avoid layout flushes by calling diff --git a/application/palemoon/components/nsBrowserGlue.js b/application/palemoon/components/nsBrowserGlue.js index 179961856..89e966a86 100644 --- a/application/palemoon/components/nsBrowserGlue.js +++ b/application/palemoon/components/nsBrowserGlue.js @@ -691,8 +691,6 @@ BrowserGlue.prototype = { } this._saveSession = false; - if (pagecount < 2) - return; if (!aQuitType) aQuitType = "quit";