gh-11245: Fix tab placement with Move Tab / Space Routing (gh-14324)

Fixes #11245
This commit is contained in:
fen4flo
2026-06-21 15:18:02 +02:00
committed by GitHub
parent 733061fbe3
commit 40080a25dc

View File

@@ -1506,19 +1506,27 @@ class nsZenWorkspaces {
continue;
}
const newtabPlacement = Services.prefs.getBoolPref(
"zen.view.show-newtab-button-top",
false
);
const insertElement = newtabPlacement
? container.firstChild
: container.lastChild;
if (container) {
if (tab.group?.hasAttribute("split-view-group")) {
gBrowser.zenHandleTabMove(tab.group, () => {
for (const subTab of tab.group.tabs) {
subTab.setAttribute("zen-workspace-id", workspaceID);
}
container.insertBefore(tab.group, container.lastChild);
container.insertBefore(tab.group, insertElement);
});
continue;
}
gBrowser.zenHandleTabMove(tab, () => {
tab.setAttribute("zen-workspace-id", workspaceID);
container.insertBefore(tab, container.lastChild);
container.insertBefore(tab, insertElement);
});
}
// also change glance tab if it's the same tab