mirror of
https://github.com/zen-browser/desktop.git
synced 2026-07-23 17:02:34 +00:00
40 lines
1.7 KiB
C++
40 lines
1.7 KiB
C++
diff --git a/browser/modules/URILoadingHelper.sys.mjs b/browser/modules/URILoadingHelper.sys.mjs
|
|
index b60820ef0cc62c27a8bab127218d625012153791..04cdd58ed4426af802f2868310140a8a33ec092b 100644
|
|
--- a/browser/modules/URILoadingHelper.sys.mjs
|
|
+++ b/browser/modules/URILoadingHelper.sys.mjs
|
|
@@ -231,6 +231,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) {
|
|
@@ -548,7 +549,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 (
|
|
@@ -981,7 +982,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(
|
|
@@ -1037,7 +1038,7 @@ export const URILoadingHelper = {
|
|
}
|
|
aSplitView.documentGlobal.focus();
|
|
} else {
|
|
- aWindow.gBrowser.tabContainer.selectedIndex = i;
|
|
+ aWindow.gZenWorkspaces.switchIfNeeded(browser);
|
|
}
|
|
}
|
|
|