mirror of
https://github.com/zen-browser/desktop.git
synced 2025-07-08 23:25:30 +02:00
Fixed Switch to workspace where container is set as default when opening container tabs
not working
This commit is contained in:
parent
4bca6a8306
commit
307becf086
2 changed files with 7 additions and 4 deletions
|
@ -111,7 +111,7 @@
|
||||||
observer.observe(tabsWrapper);
|
observer.observe(tabsWrapper);
|
||||||
tabsWrapper.addEventListener('dblclick', (event) => {
|
tabsWrapper.addEventListener('dblclick', (event) => {
|
||||||
// DO NOT REMOVE, THIS IS TO FIX "OPEN NEW TAB" ON DOUBLE CLICK
|
// DO NOT REMOVE, THIS IS TO FIX "OPEN NEW TAB" ON DOUBLE CLICK
|
||||||
});
|
}, true);
|
||||||
},
|
},
|
||||||
|
|
||||||
_initSearchBar() {
|
_initSearchBar() {
|
||||||
|
|
|
@ -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();
|
const previousWorkspace = await this.getActiveWorkspace();
|
||||||
|
alwaysChange = alwaysChange || onInit;
|
||||||
|
|
||||||
if (previousWorkspace && previousWorkspace.uuid === window.uuid && !onInit) {
|
if (previousWorkspace && previousWorkspace.uuid === window.uuid && !alwaysChange) {
|
||||||
this._cancelSwipeAnimation();
|
this._cancelSwipeAnimation();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1814,7 +1815,9 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature {
|
||||||
if (matchingWorkspaces.length === 1) {
|
if (matchingWorkspaces.length === 1) {
|
||||||
const workspace = matchingWorkspaces[0];
|
const workspace = matchingWorkspaces[0];
|
||||||
if (workspace.uuid !== this.getActiveWorkspaceFromCache().uuid) {
|
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];
|
return [userContextId, true, workspace.uuid];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue