mirror of
https://github.com/zen-browser/desktop.git
synced 2026-06-13 23:13:41 +00:00
no-bug: bypass workspace container coercion for extension-opened tabs (gh-14001)
Co-authored-by: pokeshah <89949620+pokeshah@users.noreply.github.com>
This commit is contained in:
@@ -281,7 +281,7 @@ index 43fb79a3060e20f671ae6ffc26350c7abf497702..146b1559b8430773bd4ec173a8f4fe88
|
||||
+ let hasZenDefaultUserContextId = false;
|
||||
+ let zenForcedWorkspaceId = undefined;
|
||||
+ if (typeof gZenWorkspaces !== "undefined" && !_forZenEmptyTab) {
|
||||
+ [userContextId, hasZenDefaultUserContextId, zenForcedWorkspaceId] = gZenWorkspaces.getContextIdIfNeeded(userContextId, fromExternal);
|
||||
+ [userContextId, hasZenDefaultUserContextId, zenForcedWorkspaceId] = gZenWorkspaces.getContextIdIfNeeded(userContextId, fromExternal, triggeringPrincipal);
|
||||
+ }
|
||||
+
|
||||
if (!UserInteraction.running("browser.tabs.opening", window)) {
|
||||
|
||||
@@ -2979,11 +2979,18 @@ class nsZenWorkspaces {
|
||||
|
||||
// Tab browser utilities
|
||||
|
||||
getContextIdIfNeeded(userContextId, fromExternal) {
|
||||
getContextIdIfNeeded(userContextId, fromExternal, triggeringPrincipal) {
|
||||
if (!this.workspaceEnabled) {
|
||||
return [userContextId, false, undefined];
|
||||
}
|
||||
|
||||
if (
|
||||
triggeringPrincipal &&
|
||||
triggeringPrincipal.isAddonOrExpandedAddonPrincipal
|
||||
) {
|
||||
return [userContextId, false, undefined];
|
||||
}
|
||||
|
||||
if (
|
||||
this.shouldForceContainerTabsToWorkspace &&
|
||||
typeof userContextId !== "undefined" &&
|
||||
|
||||
Reference in New Issue
Block a user