mirror of
https://github.com/zen-browser/desktop.git
synced 2025-09-05 19:08:18 +00:00
fix: Fixed browser focus on an essential not switching workspaces, b=(no-bug), c=workspaces
This commit is contained in:
@@ -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'));
|
||||
}
|
||||
|
Reference in New Issue
Block a user