Fixed duplicating a tab showing the default workspace container indicator (closes https://github.com/zen-browser/desktop/issues/4132)

This commit is contained in:
mr. M
2025-01-02 20:01:09 +01:00
parent fc12649028
commit a7247f16f7
2 changed files with 12 additions and 1 deletions

View File

@@ -1331,7 +1331,6 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature {
for (const tab of gBrowser.tabs) {
const tabWorkspaceId = tab.getAttribute('zen-workspace-id');
const isEssential = tab.getAttribute("zen-essential") === "true";
const tabContextId = tab.getAttribute("usercontextid");
// Always hide last selected tabs from other workspaces
if (lastSelectedTab === tab && tabWorkspaceId !== workspaceUuid && !isEssential) {

View File

@@ -0,0 +1,12 @@
diff --git a/browser/components/sessionstore/SessionStore.sys.mjs b/browser/components/sessionstore/SessionStore.sys.mjs
index 8125c1afc07f3365a2ad030adaf6a560453d7fe6..2856c5f93bfc9d68b98e09b2f26e3d5266c1f46a 100644
--- a/browser/components/sessionstore/SessionStore.sys.mjs
+++ b/browser/components/sessionstore/SessionStore.sys.mjs
@@ -3679,6 +3679,7 @@ var SessionStoreInternal = {
aWindow.gBrowser.selectedTab = newTab;
}
+ if (aTab.hasAttribute("zenDefaultUserContextId")) newTab.setAttribute("zenDefaultUserContextId", true);
// Restore the state into the new tab.
this.restoreTab(newTab, tabState, {
restoreImmediately: aRestoreImmediately,