Fix: Open external links in workspace's default container (#2081)

* Fix: Pass `fromExternal` to `ZenWorkspaces.getContextIdIfNeeded`

* Add allowInheritPrincipal to ZenWorkspaces.getContextIdIfNeeded
This commit is contained in:
kristijanribaric
2024-10-13 23:48:39 +02:00
committed by GitHub
parent b5260051a0
commit 0150e6d689

View File

@@ -1,5 +1,5 @@
diff --git a/browser/components/tabbrowser/content/tabbrowser.js b/browser/components/tabbrowser/content/tabbrowser.js diff --git a/browser/components/tabbrowser/content/tabbrowser.js b/browser/components/tabbrowser/content/tabbrowser.js
index c89ae2cbb978d6218bd56a059c5ca1e371231607..ab88ba4024bf5d069ef4ca613024f422ad513405 100644 index c89ae2cbb978d6218bd56a059c5ca1e371231607..a812f3ec86d9967582f99b0eb0c3f1367c39fc8f 100644
--- a/browser/components/tabbrowser/content/tabbrowser.js --- a/browser/components/tabbrowser/content/tabbrowser.js
+++ b/browser/components/tabbrowser/content/tabbrowser.js +++ b/browser/components/tabbrowser/content/tabbrowser.js
@@ -456,11 +456,26 @@ @@ -456,11 +456,26 @@
@@ -37,7 +37,7 @@ index c89ae2cbb978d6218bd56a059c5ca1e371231607..ab88ba4024bf5d069ef4ca613024f422
+ let hasZenDefaultUserContextId = false; + let hasZenDefaultUserContextId = false;
+ if (typeof ZenWorkspaces !== "undefined") { + if (typeof ZenWorkspaces !== "undefined") {
+ [userContextId, hasZenDefaultUserContextId] = ZenWorkspaces.getContextIdIfNeeded(userContextId); + [userContextId, hasZenDefaultUserContextId] = ZenWorkspaces.getContextIdIfNeeded(userContextId, fromExternal, allowInheritPrincipal);
+ } + }
+ +
if (!UserInteraction.running("browser.tabs.opening", window)) { if (!UserInteraction.running("browser.tabs.opening", window)) {