no-bug: set last selected workspace tab to background tab (gh-14395)

This commit is contained in:
Ashvin Jangid
2026-06-28 14:10:13 +05:30
committed by GitHub
parent e59e37fcbb
commit 84ba80bc11

View File

@@ -245,10 +245,6 @@ class nsZenSpaceRoutingManager {
if (targetWorkspace) {
workspaces.moveTabToWorkspace(newTab, targetWorkspace.uuid);
if (inBackground) {
return;
}
const mostRecentWindow =
Services.wm.getMostRecentWindow("navigator:browser");
const isOriginatingWindow = win === mostRecentWindow;
@@ -256,7 +252,10 @@ class nsZenSpaceRoutingManager {
win.gZenWorkspaces.lastSelectedWorkspaceTabs[
targetWorkspace.uuid
] = newTab;
await win.gZenWorkspaces.changeWorkspace(targetWorkspace);
if (!inBackground) {
await win.gZenWorkspaces.changeWorkspace(targetWorkspace);
}
}
}
}