mirror of
https://github.com/zen-browser/desktop.git
synced 2026-05-24 22:00:13 +00:00
gh-13642: fix unexpected sidebar width increase in compact mode (gh-13794)
`getAndApplySidebarWidth()` does handle this case but in the condition
it requires the event.
```
if (
event &&
shouldRecalculate &&
sidebarExpanded &&
!gZenVerticalTabsManager._hadSidebarCollapse
) {
return;
}
```
If the function does not return here then it makes the
`--zen-sidebar-width` = `--actual-zen-sidebar-width` which adds the
padding's width to the sidebar.
I don't know if not passing event in the function was intentional, but
this seems to fix the issue.
fixes: #13642
This commit is contained in:
@@ -1510,7 +1510,7 @@ window.gZenVerticalTabsManager = {
|
||||
this.navigatorToolbox.after(splitter);
|
||||
window.dispatchEvent(new Event("resize"));
|
||||
if (!isCompactMode) {
|
||||
gZenCompactModeManager.getAndApplySidebarWidth();
|
||||
gZenCompactModeManager.getAndApplySidebarWidth({});
|
||||
}
|
||||
gZenUIManager.updateTabsToolbar();
|
||||
this.rebuildURLBarMenus();
|
||||
|
||||
@@ -219,7 +219,7 @@ class nsZenWorkspaceCreation extends MozXULElement {
|
||||
document.getElementById("nav-bar").style.visibility = "collapse";
|
||||
}
|
||||
this.style.visibility = "visible";
|
||||
gZenCompactModeManager.getAndApplySidebarWidth();
|
||||
gZenCompactModeManager.getAndApplySidebarWidth({});
|
||||
this.resolveInitialized();
|
||||
let animation = gZenUIManager.motion.animate(
|
||||
this.elementsToAnimate,
|
||||
|
||||
Reference in New Issue
Block a user