mirror of
https://github.com/zen-browser/desktop.git
synced 2026-08-29 09:51:33 +00:00
Refactor watermark handling and improve tab switching logic for enhanced user experience
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
diff --git a/browser/base/content/browser.js b/browser/base/content/browser.js
|
||||
index 019b168c1aeae7e1c97a3ae58c99a48a27f54134..26a5b896de61ce73b03d1b378487d0e84c6a0a5b 100644
|
||||
index 019b168c1aeae7e1c97a3ae58c99a48a27f54134..56ed0bffb0ec0863c18ef881acb4efcc590e4a96 100644
|
||||
--- a/browser/base/content/browser.js
|
||||
+++ b/browser/base/content/browser.js
|
||||
@@ -32,6 +32,7 @@ ChromeUtils.defineESModuleGetters(this, {
|
||||
@@ -42,3 +42,20 @@ index 019b168c1aeae7e1c97a3ae58c99a48a27f54134..26a5b896de61ce73b03d1b378487d0e8
|
||||
},
|
||||
|
||||
openURIInFrame: function browser_openURIInFrame(
|
||||
@@ -6351,7 +6361,7 @@ function switchToTabHavingURI(
|
||||
ignoreQueryString || replaceQueryString,
|
||||
ignoreFragmentWhenComparing
|
||||
);
|
||||
- let browsers = aWindow.gBrowser.browsers;
|
||||
+ let browsers = aWindow.ZenWorkspaces.allUsedBrowsers;
|
||||
for (let i = 0; i < browsers.length; i++) {
|
||||
let browser = browsers[i];
|
||||
let browserCompare = cleanURL(
|
||||
@@ -6364,6 +6374,7 @@ function switchToTabHavingURI(
|
||||
continue;
|
||||
}
|
||||
if (requestedCompare == browserCompare) {
|
||||
+ aWindow.ZenWorkspaces.switchIfNeeded(browser);
|
||||
// If adoptIntoActiveWindow is set, and this is a cross-window switch,
|
||||
// adopt the tab into the current window, after the active tab.
|
||||
let doAdopt =
|
||||
|
||||
Reference in New Issue
Block a user