1
0
Fork 1
mirror of https://github.com/zen-browser/desktop.git synced 2025-07-09 00:35:31 +02:00

Fixed Switch to workspace where container is set as default when opening container tabs not working

This commit is contained in:
mr. M 2025-01-31 19:13:18 +01:00
parent 4bca6a8306
commit 307becf086
No known key found for this signature in database
GPG key ID: CBD57A2AEDBDA1FB
2 changed files with 7 additions and 4 deletions

View file

@ -111,7 +111,7 @@
observer.observe(tabsWrapper);
tabsWrapper.addEventListener('dblclick', (event) => {
// DO NOT REMOVE, THIS IS TO FIX "OPEN NEW TAB" ON DOUBLE CLICK
});
}, true);
},
_initSearchBar() {

View file

@ -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];
}
}