Files
desktop/src/browser/modules/URILoadingHelper-sys-mjs.patch

40 lines
1.7 KiB
C++

diff --git a/browser/modules/URILoadingHelper.sys.mjs b/browser/modules/URILoadingHelper.sys.mjs
index ed6b9fda700b2b4b35836a77a4da953377a72f4b..22acedcf1006f994ec8b6bf8991b4202e12a6f39 100644
--- a/browser/modules/URILoadingHelper.sys.mjs
+++ b/browser/modules/URILoadingHelper.sys.mjs
@@ -224,6 +224,7 @@ function openInWindow(url, params, sourceWindow) {
features,
sa
);
+ win._zenStartupSyncFlag = Services.prefs.getBoolPref('zen.window-sync.open-link-in-new-unsynced-window') ? 'unsynced' : 'synced';
}
function openInCurrentTab(targetBrowser, url, uriObj, params) {
@@ -541,7 +542,7 @@ export const URILoadingHelper = {
// page. If a load request bounces off for the currently selected tab,
// we'll open a new tab instead.
let tab = w.gBrowser.getTabForBrowser(targetBrowser);
- if (tab == w.FirefoxViewHandler.tab) {
+ if (tab == w.FirefoxViewHandler.tab || tab.hasAttribute("zen-empty-tab")) {
where = "tab";
targetBrowser = null;
} else if (
@@ -974,7 +975,7 @@ export const URILoadingHelper = {
ignoreQueryString || replaceQueryString,
ignoreFragmentWhenComparing
);
- let browsers = aWindow.gBrowser.browsers;
+ let browsers = aWindow.gZenWorkspaces.allUsedBrowsers;
for (let i = 0; i < browsers.length; i++) {
let browser = browsers[i];
let browserCompare = cleanURL(
@@ -1026,7 +1027,7 @@ export const URILoadingHelper = {
aSplitView.replaceTab(tabToReplace, tabToMove);
aSplitView.ownerGlobal.focus();
} else {
- aWindow.gBrowser.tabContainer.selectedIndex = i;
+ aWindow.gZenWorkspaces.switchIfNeeded(browser);
}
}