mirror of
https://github.com/zen-browser/components.git
synced 2025-07-07 21:59:59 +02:00
Merge pull request #52 from kristijanribaric/fix/workspaces-open-external-links-in-default-container
Fix: Open external links in workspace's default container
This commit is contained in:
commit
232cb69ccf
1 changed files with 11 additions and 2 deletions
|
@ -874,10 +874,19 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature {
|
|||
});
|
||||
}
|
||||
|
||||
getContextIdIfNeeded(userContextId) {
|
||||
getContextIdIfNeeded(userContextId, fromExternal, allowInheritPrincipal) {
|
||||
if(!this.workspaceEnabled) {
|
||||
return [userContextId, false];
|
||||
}
|
||||
|
||||
const activeWorkspace = this.getActiveWorkspaceFromCache();
|
||||
const activeWorkspaceUserContextId = activeWorkspace?.containerTabId;
|
||||
if ((typeof userContextId !== 'undefined' && userContextId !== activeWorkspaceUserContextId) || !this.workspaceEnabled) {
|
||||
|
||||
if((fromExternal || allowInheritPrincipal === false) && !!activeWorkspaceUserContextId) {
|
||||
return [activeWorkspaceUserContextId, true];
|
||||
}
|
||||
|
||||
if (typeof userContextId !== 'undefined' && userContextId !== activeWorkspaceUserContextId) {
|
||||
return [userContextId, false];
|
||||
}
|
||||
return [activeWorkspaceUserContextId, true];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue