fix: Fixed moving tabs to different workspaces, b=no-bug, c=common, folders, split-view, workspaces

This commit is contained in:
Mr. M
2025-08-30 15:00:20 +02:00
parent 6e9be15dac
commit eedc5b7307
5 changed files with 101 additions and 77 deletions

View File

@@ -1483,18 +1483,22 @@ var gZenWorkspaces = new (class extends nsZenMultiWindowFeature {
continue;
}
tab.setAttribute('zen-workspace-id', workspaceID);
if (tab.hasAttribute('zen-essential')) {
continue;
}
if (container && !justChangeId) {
if (tab.group?.hasAttribute('split-view-group')) {
this.moveTabsToWorkspace(tab.group.tabs, workspaceID, true);
container.insertBefore(tab.group, container.lastChild);
gBrowser.zenHandleTabMove(tab.group, () => {
this.moveTabsToWorkspace(tab.group.tabs, workspaceID, true);
container.insertBefore(tab.group, container.lastChild);
});
continue;
}
container.insertBefore(tab, container.lastChild);
gBrowser.zenHandleTabMove(tab, () => {
tab.setAttribute('zen-workspace-id', workspaceID);
container.insertBefore(tab, container.lastChild);
});
}
// also change glance tab if it's the same tab
const glanceTab = tab.querySelector('.tabbrowser-tab[zen-glance-tab]');
@@ -2626,7 +2630,7 @@ var gZenWorkspaces = new (class extends nsZenMultiWindowFeature {
menu.appendChild(menuPopup);
document.getElementById('context_closeDuplicateTabs').after(menu);
document.getElementById('context_moveTabOptions').after(menu);
}
async changeTabWorkspace(workspaceID) {