diff --git a/src/browser/components/tabbrowser/content/tabbrowser-js.patch b/src/browser/components/tabbrowser/content/tabbrowser-js.patch index 39ff4e0d3..7327740e8 100644 --- a/src/browser/components/tabbrowser/content/tabbrowser-js.patch +++ b/src/browser/components/tabbrowser/content/tabbrowser-js.patch @@ -1,5 +1,5 @@ diff --git a/browser/components/tabbrowser/content/tabbrowser.js b/browser/components/tabbrowser/content/tabbrowser.js -index 42027bfa55eab8ea9298a7d425f2ded45188f7f3..d39d295c786fd9e6da29a8fa4b3b2a00a1cfd380 100644 +index 42027bfa55eab8ea9298a7d425f2ded45188f7f3..ebf699804db90e5509d1b1b704c95f18e829ca07 100644 --- a/browser/components/tabbrowser/content/tabbrowser.js +++ b/browser/components/tabbrowser/content/tabbrowser.js @@ -386,6 +386,7 @@ @@ -173,7 +173,7 @@ index 42027bfa55eab8ea9298a7d425f2ded45188f7f3..d39d295c786fd9e6da29a8fa4b3b2a00 _setTabLabel(aTab, aLabel, { beforeTabOpen, isContentTitle, isURL } = {}) { - if (!aLabel || aLabel.includes("about:reader?")) { -+ if (!aTab._zenContentsVisible && !aTab._zenChangeLabelFlag && !aTab._labelIsInitialTitle) { ++ if (!aTab._zenContentsVisible && !aTab._zenChangeLabelFlag && !aTab._labelIsInitialTitle && !gZenWorkspaces.privateWindowOrDisabled) { + return false; + } + gZenPinnedTabManager.onTabLabelChanged(aTab); diff --git a/src/zen/sessionstore/ZenWindowSync.sys.mjs b/src/zen/sessionstore/ZenWindowSync.sys.mjs index 998c79b0d..059b8c474 100644 --- a/src/zen/sessionstore/ZenWindowSync.sys.mjs +++ b/src/zen/sessionstore/ZenWindowSync.sys.mjs @@ -780,19 +780,18 @@ class nsZenWindowSync { const moveAllTabsToWindow = (allowSelected = false) => { const { gBrowser, gZenWorkspaces } = win; win.focus(); - let tabIndex = 0; let success = true; for (const tab of tabsToMove) { if (tab !== selectedTab || allowSelected) { - const newTab = gBrowser.adoptTab(tab, { tabIndex }); + const newTab = gBrowser.adoptTab(tab, { tabIndex: Infinity }); if (!newTab) { // The adoption failed. Restore "fadein" and don't increase the index. tab.setAttribute('fadein', 'true'); success = false; continue; } + newTab._zenContentsVisible = true; gZenWorkspaces.moveTabToWorkspace(newTab, aWorkspaceId); - ++tabIndex; } } if (success) { diff --git a/src/zen/welcome/ZenWelcome.mjs b/src/zen/welcome/ZenWelcome.mjs index 3e1074bf5..36c680ef2 100644 --- a/src/zen/welcome/ZenWelcome.mjs +++ b/src/zen/welcome/ZenWelcome.mjs @@ -292,9 +292,6 @@ for (const tab of _tabsToPin) { tab.setAttribute('zen-workspace-id', gZenWorkspaces.activeWorkspace); gBrowser.pinTab(tab); - await new Promise((resolve) => { - tab.addEventListener('ZenPinnedTabCreated', resolve, { once: true }); - }); } for (const tab of _tabsToPinEssentials) { tab.removeAttribute('pending'); // Make it appear loaded