Fixed creating a new tab when we can just select the last one when switching workspaces

This commit is contained in:
mr. m
2025-02-11 13:45:09 +01:00
parent 6600e60498
commit 48badb83cf

View File

@@ -1480,7 +1480,10 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature {
}
// Find first suitable tab
else {
tabToSelect = Array.from(visibleTabs).find((tab) => this._shouldShowTab(tab, window.uuid, containerId, workspaces));
tabToSelect = Array.from(visibleTabs).find((tab) => !tab.pinned);
if (!tabToSelect && visibleTabs.length) {
tabToSelect = Array.from(visibleTabs)[visibleTabs.length - 1];
}
}
const previousSelectedTab = gBrowser.selectedTab;