mirror of
https://github.com/zen-browser/desktop.git
synced 2026-08-12 09:45:18 +00:00
feat: Unsynced windows should always be allowed to change labels, b=no-bug, c=welcome
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user