diff --git a/src/browser/components/tabbrowser/content/tabbrowser-js.patch b/src/browser/components/tabbrowser/content/tabbrowser-js.patch index e5813e9ba..ddd1b60db 100644 --- a/src/browser/components/tabbrowser/content/tabbrowser-js.patch +++ b/src/browser/components/tabbrowser/content/tabbrowser-js.patch @@ -1,5 +1,5 @@ diff --git a/browser/components/tabbrowser/content/tabbrowser.js b/browser/components/tabbrowser/content/tabbrowser.js -index 43180487a2fac15b7a65fac94f233eeed9094990..ae1288974cae29da929f27b78ff8db542566eba2 100644 +index 43180487a2fac15b7a65fac94f233eeed9094990..ef6d30eb681caeae48d15280687b3bc37dbadc37 100644 --- a/browser/components/tabbrowser/content/tabbrowser.js +++ b/browser/components/tabbrowser/content/tabbrowser.js @@ -514,6 +514,7 @@ @@ -523,7 +523,7 @@ index 43180487a2fac15b7a65fac94f233eeed9094990..ae1288974cae29da929f27b78ff8db54 + } else { + gZenWorkspaces._tabToRemoveForEmpty = leftoverTab; + if (Services.prefs.getBoolPref("zen.workspaces.continue-where-left-off")) { -+ gZenWorkspaces._tabToSelect = selectTab - 2; // -1 for the offset, and another -1 for the empty tab. ++ gZenWorkspaces._tabToSelect = selectTab - 1; // -1 for the empty tab. + } + if (gZenWorkspaces._initialTab && !gZenVerticalTabsManager._canReplaceNewTab) { + gZenWorkspaces._initialTab._shouldRemove = true; @@ -984,7 +984,7 @@ index 43180487a2fac15b7a65fac94f233eeed9094990..ae1288974cae29da929f27b78ff8db54 + if (!gZenFolders.canDropElement(element, targetElement)) { + element = element.group; + } -+ if (!element.hasAttribute('zen-essential') && targetElement?.hasAttribute('zen-essential')) { ++ if (!element.hasAttribute('zen-essential') && targetElement?.hasAttribute('zen-essential')) { + targetElement = null; + moveBefore = false; + } diff --git a/src/zen/spaces/ZenSpaceManager.mjs b/src/zen/spaces/ZenSpaceManager.mjs index 92b98bee3..406cd8a04 100644 --- a/src/zen/spaces/ZenSpaceManager.mjs +++ b/src/zen/spaces/ZenSpaceManager.mjs @@ -872,7 +872,7 @@ class nsZenWorkspaces { ) { this.log(`Found tab to select: ${this._tabToSelect}, ${tabs.length}`); let tabToUse = gZenGlanceManager.getTabOrGlanceParent( - tabs[this._tabToSelect + 1] || this._emptyTab + tabs[this._tabToSelect] || this._emptyTab ); gBrowser.selectedTab = tabToUse; this._removedByStartupPage = true;