mirror of
https://github.com/zen-browser/desktop.git
synced 2026-03-29 20:01:52 +00:00
feat: Return to previous tab when closing tabs, p=#11933
* fix: Switch to last used tab on tab close lastAccessed time will be used to select the active tab instead of positional selection or ownership when a tab is closed, returning the user to their last used tab. * test: Merge branch and add tests, b=no-bug, c=common, tests, tabs, workspaces --------- Co-authored-by: mr. m <91018726+mr-cheffy@users.noreply.github.com>
This commit is contained in:
@@ -2819,9 +2819,8 @@ class nsZenWorkspaces {
|
||||
const tabWorkspaceId = aTab.getAttribute("zen-workspace-id");
|
||||
const containerId = aTab.getAttribute("usercontextid") ?? "0";
|
||||
// Return all tabs that are not on the same workspace
|
||||
return this.allStoredTabs.filter(
|
||||
return gBrowser.tabs.filter(
|
||||
(tab) =>
|
||||
tab.getAttribute("zen-workspace-id") !== tabWorkspaceId &&
|
||||
!this._shouldShowTab(tab, tabWorkspaceId, containerId, this._workspaceCache) &&
|
||||
!tab.hasAttribute("zen-empty-tab")
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user