feat: Unsynced windows should always be allowed to change labels, b=no-bug, c=welcome

This commit is contained in:
mr. m
2025-12-13 21:11:23 +01:00
parent cc31282ce2
commit a3c6d412bb
3 changed files with 4 additions and 8 deletions

View File

@@ -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);

View File

@@ -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) {

View File

@@ -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