This commit introduces a new parameter allowInheritPrincipal to the getContextIdIfNeeded function in ZenWorkspaces.mjs. This allows recognition of opening bookmarks in new tab so that they can be opened in a default container.

This commit is contained in:
Kristijan Ribarić 2024-10-13 22:41:37 +02:00
parent 893ebcd0f7
commit ca0e6030d5

View file

@ -874,7 +874,7 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature {
}); });
} }
getContextIdIfNeeded(userContextId, fromExternal) { getContextIdIfNeeded(userContextId, fromExternal, allowInheritPrincipal) {
if(!this.workspaceEnabled) { if(!this.workspaceEnabled) {
return [userContextId, false]; return [userContextId, false];
} }
@ -882,7 +882,7 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature {
const activeWorkspace = this.getActiveWorkspaceFromCache(); const activeWorkspace = this.getActiveWorkspaceFromCache();
const activeWorkspaceUserContextId = activeWorkspace?.containerTabId; const activeWorkspaceUserContextId = activeWorkspace?.containerTabId;
if(fromExternal && !!activeWorkspaceUserContextId) { if((fromExternal || allowInheritPrincipal === false) && !!activeWorkspaceUserContextId) {
return [activeWorkspaceUserContextId, true]; return [activeWorkspaceUserContextId, true];
} }