fix: Fixed browser focus on an essential not switching workspaces, b=(no-bug), c=workspaces

This commit is contained in:
Mr. M
2025-04-27 23:56:51 +02:00
parent 6b8f3b750e
commit 0f71de410b

View File

@@ -2826,7 +2826,10 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature {
if (tab.hasAttribute('zen-essential')) {
// Find first workspace with the same container
const containerTabId = parseInt(tab.parentNode.getAttribute('container'));
workspaceToSwitch = this.getWoekspaceFromId(containerTabId);
// +0 to convert to number
workspaceToSwitch = this._workspaceCache.workspaces.find(
(workspace) => workspace.containerTabId + 0 === containerTabId
);
} else {
workspaceToSwitch = this.getWoekspaceFromId(tab.getAttribute('zen-workspace-id'));
}