mirror of
https://github.com/zen-browser/desktop.git
synced 2026-06-22 10:53:22 +00:00
gh-11245: Fix tab placement with Move Tab / Space Routing (gh-14324)
Fixes #11245
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user