gh-14380: Fix sidebar width getting stuck when toggling layout on the right side (gh-15092)

This commit is contained in:
Fernando Omori
2026-08-29 07:35:31 -03:00
committed by GitHub
parent 2326d2b56b
commit a5585c5619

View File

@@ -1348,18 +1348,21 @@ window.gZenVerticalTabsManager = {
document.documentElement.removeAttribute("zen-right-side");
}
delete this._hadSidebarCollapse;
if (isSidebarExpanded) {
this._hadSidebarCollapse = !document.documentElement.hasAttribute(
"zen-sidebar-expanded"
);
this.navigatorToolbox.setAttribute("zen-sidebar-expanded", "true");
document.documentElement.setAttribute("zen-sidebar-expanded", "true");
gBrowser.tabContainer.setAttribute("expanded", "true");
} else {
this.navigatorToolbox.removeAttribute("zen-sidebar-expanded");
document.documentElement.removeAttribute("zen-sidebar-expanded");
gBrowser.tabContainer.removeAttribute("expanded");
const wasSidebarExpanded = document.documentElement.hasAttribute(
"zen-sidebar-expanded"
);
if (isSidebarExpanded !== wasSidebarExpanded) {
delete this._hadSidebarCollapse;
if (isSidebarExpanded) {
this._hadSidebarCollapse = true;
this.navigatorToolbox.setAttribute("zen-sidebar-expanded", "true");
document.documentElement.setAttribute("zen-sidebar-expanded", "true");
gBrowser.tabContainer.setAttribute("expanded", "true");
} else {
this.navigatorToolbox.removeAttribute("zen-sidebar-expanded");
document.documentElement.removeAttribute("zen-sidebar-expanded");
gBrowser.tabContainer.removeAttribute("expanded");
}
}
const appContentNavbarContaienr = document.getElementById(