Fixed common issues when opening the settings page on the same workspace

This commit is contained in:
mr. m 2025-02-24 20:07:30 +01:00
parent 054f628192
commit 35f38a116a
No known key found for this signature in database
GPG key ID: 419302196C23B258
3 changed files with 11 additions and 19 deletions

View file

@ -1,5 +1,5 @@
diff --git a/browser/base/content/browser.js b/browser/base/content/browser.js
index 019b168c1aeae7e1c97a3ae58c99a48a27f54134..89045fd46888d2a15ccee1b35ed83692faaad364 100644
index 019b168c1aeae7e1c97a3ae58c99a48a27f54134..22dcf304591290d7a1b60f01998b6cf4782c0cdc 100644
--- a/browser/base/content/browser.js
+++ b/browser/base/content/browser.js
@@ -32,6 +32,7 @@ ChromeUtils.defineESModuleGetters(this, {
@ -51,13 +51,12 @@ index 019b168c1aeae7e1c97a3ae58c99a48a27f54134..89045fd46888d2a15ccee1b35ed83692
for (let i = 0; i < browsers.length; i++) {
let browser = browsers[i];
let browserCompare = cleanURL(
@@ -6392,7 +6402,9 @@ function switchToTabHavingURI(
@@ -6392,7 +6402,7 @@ function switchToTabHavingURI(
}
if (!doAdopt) {
+ aWindow.ZenWorkspaces.switchIfNeeded(browser).then(() => {
aWindow.gBrowser.tabContainer.selectedIndex = i;
+ });
- aWindow.gBrowser.tabContainer.selectedIndex = i;
+ aWindow.ZenWorkspaces.switchIfNeeded(browser, i);
}
return true;