mirror of
https://github.com/zen-browser/desktop.git
synced 2025-10-16 06:46:12 +00:00
fix: FIxed restoring pined and essential tabs not being on the correct parent element, b=(bug #8726), c=tests, workspaces
This commit is contained in:
@@ -3322,4 +3322,20 @@ var gZenWorkspaces = new (class extends ZenMultiWindowFeature {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
fixTabInsertLocation(tab) {
|
||||
if (tab.hasAttribute('zen-essential')) {
|
||||
// Essential tabs should always be inserted at the end of the essentials section
|
||||
const essentialsSection = this.getEssentialsSection(tab);
|
||||
if (essentialsSection) {
|
||||
essentialsSection.appendChild(tab);
|
||||
}
|
||||
} else if (tab.pinned) {
|
||||
// Pinned tabs should always be inserted at the end of the pinned tabs container
|
||||
const pinnedContainer = this.pinnedTabsContainer;
|
||||
if (pinnedContainer) {
|
||||
pinnedContainer.insertBefore(tab, pinnedContainer.lastChild);
|
||||
}
|
||||
}
|
||||
}
|
||||
})();
|
||||
|
Reference in New Issue
Block a user