mirror of
https://github.com/zen-browser/desktop.git
synced 2025-09-05 19:08:18 +00:00
Fixed common issues when opening the settings page on the same workspace
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..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;
|
||||
|
@@ -311,11 +311,6 @@
|
||||
position: relative !important;
|
||||
}
|
||||
|
||||
& #urlbar {
|
||||
transform: translateY(-50%);
|
||||
transition: transform 0.1s ease-in-out;
|
||||
}
|
||||
|
||||
@media (-moz-bool-pref: 'zen.view.compact.color-toolbar') {
|
||||
background-attachment: fixed;
|
||||
background: var(--zen-main-browser-background-toolbar);
|
||||
|
@@ -2303,14 +2303,12 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature {
|
||||
}
|
||||
}
|
||||
|
||||
switchIfNeeded(browser) {
|
||||
return new Promise(async (resolve) => {
|
||||
const tab = gBrowser.getTabForBrowser(browser);
|
||||
const workspaceId = tab.getAttribute('zen-workspace-id');
|
||||
if (!tab.hasAttribute('zen-essential') && workspaceId !== this.activeWorkspace) {
|
||||
await this.changeWorkspace({ uuid: workspaceId });
|
||||
}
|
||||
resolve();
|
||||
});
|
||||
async switchIfNeeded(browser, i) {
|
||||
const tab = gBrowser.getTabForBrowser(browser);
|
||||
const workspaceId = tab.getAttribute('zen-workspace-id');
|
||||
if (!tab.hasAttribute('zen-essential') && workspaceId !== this.activeWorkspace) {
|
||||
await this.changeWorkspace({ uuid: workspaceId });
|
||||
}
|
||||
gBrowser.selectedTab = tab;
|
||||
}
|
||||
})();
|
||||
|
Reference in New Issue
Block a user