feat: Only dispatch elements to the tab browser if we are on the active workspace, b=(no-bug), c=workspaces

This commit is contained in:
mr. m
2025-05-22 12:13:18 +02:00
parent b03cdba607
commit be55a26a94
2 changed files with 44 additions and 12 deletions

View File

@@ -446,7 +446,7 @@ var gZenWorkspaces = new (class extends ZenMultiWindowFeature {
const container = document.getElementById('tabbrowser-arrowscrollbox');
workspaceWrapper.id = workspace.uuid;
if (this.activeWorkspace === workspace.uuid) {
workspaceWrapper.setAttribute('active', 'true');
workspaceWrapper.active = true;
}
await new Promise((resolve) => {
@@ -1911,11 +1911,7 @@ var gZenWorkspaces = new (class extends ZenMultiWindowFeature {
// Refresh tab cache
for (const otherWorkspace of workspaces.workspaces) {
const container = this.workspaceElement(otherWorkspace.uuid);
if (otherWorkspace.uuid === workspace.uuid) {
container.setAttribute('active', 'true');
} else {
container.removeAttribute('active');
}
container.active = otherWorkspace.uuid === workspace.uuid;
}
gBrowser.verticalPinnedTabsContainer =
this.pinnedTabsContainer || gBrowser.verticalPinnedTabsContainer;
@@ -2172,13 +2168,11 @@ var gZenWorkspaces = new (class extends ZenMultiWindowFeature {
)
);
}
element.active = offset === 0;
if (offset === 0) {
element.setAttribute('active', 'true');
if (tabToSelect != gBrowser.selectedTab && !onInit) {
gBrowser.selectedTab = tabToSelect;
}
} else {
element.removeAttribute('active');
}
}
if (this.containerSpecificEssentials && previousWorkspace) {