mirror of
https://github.com/zen-browser/desktop.git
synced 2025-09-14 07:18:21 +00:00
Fixed Switch to workspace where container is set as default when opening container tabs
not working
This commit is contained in:
@@ -1306,10 +1306,11 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature {
|
||||
}
|
||||
}
|
||||
|
||||
async _performWorkspaceChange(window, { onInit = false, explicitAnimationDirection = undefined } = {}) {
|
||||
async _performWorkspaceChange(window, { onInit = false, alwaysChange = false, explicitAnimationDirection = undefined } = {}) {
|
||||
const previousWorkspace = await this.getActiveWorkspace();
|
||||
alwaysChange = alwaysChange || onInit;
|
||||
|
||||
if (previousWorkspace && previousWorkspace.uuid === window.uuid && !onInit) {
|
||||
if (previousWorkspace && previousWorkspace.uuid === window.uuid && !alwaysChange) {
|
||||
this._cancelSwipeAnimation();
|
||||
return;
|
||||
}
|
||||
@@ -1814,7 +1815,9 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature {
|
||||
if (matchingWorkspaces.length === 1) {
|
||||
const workspace = matchingWorkspaces[0];
|
||||
if (workspace.uuid !== this.getActiveWorkspaceFromCache().uuid) {
|
||||
this.changeWorkspace(workspace);
|
||||
window.addEventListener('TabSelected', (event) => {
|
||||
this.changeWorkspace(workspace, { alwaysChange: true });
|
||||
}, { once: true });
|
||||
return [userContextId, true, workspace.uuid];
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user