Skip to content

Commit 0693bb7

Browse files
committed
fix: Fixed compact mode sidebar infinitily expanding when creating a new workspace, b=no-bug, c=compact-mode, workspaces
1 parent 7f28047 commit 0693bb7

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

src/browser/app/profile/features/view.inc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// License, v. 2.0. If a copy of the MPL was not distributed with this
33
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
44

5-
pref('zen.view.sidebar-height-throttle', 200); // in ms
5+
pref('zen.view.sidebar-height-throttle', 0); // in ms
66
pref('zen.view.sidebar-expanded.max-width', 500);
77

88
#ifdef XP_MACOSX

src/zen/compact-mode/ZenCompactMode.mjs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -215,8 +215,9 @@ var gZenCompactModeManager = {
215215
let sidebarWidth = this.sidebar.getBoundingClientRect().width;
216216
const shouldRecalculate =
217217
this.preference || document.documentElement.hasAttribute('zen-creating-workspace');
218+
const sidebarExpanded = document.documentElement.hasAttribute('zen-sidebar-expanded');
218219
if (sidebarWidth > 1) {
219-
if (shouldRecalculate && gZenVerticalTabsManager._prefsSidebarExpanded) {
220+
if (shouldRecalculate && sidebarExpanded) {
220221
sidebarWidth = Math.max(sidebarWidth, 150);
221222
}
222223
// Second variable to get the genuine width of the sidebar
@@ -225,7 +226,7 @@ var gZenCompactModeManager = {
225226
if (
226227
event &&
227228
shouldRecalculate &&
228-
gZenVerticalTabsManager._prefsSidebarExpanded &&
229+
sidebarExpanded &&
229230
!gZenVerticalTabsManager._hadSidebarCollapse
230231
) {
231232
return;

src/zen/workspaces/ZenWorkspaceCreation.mjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,7 @@
170170
document.getElementById('nav-bar').style.visibility = 'collapse';
171171
}
172172
this.style.visibility = 'visible';
173+
gZenCompactModeManager.getAndApplySidebarWidth();
173174
this.resolveInitialized();
174175
gZenUIManager.motion
175176
.animate(

0 commit comments

Comments
 (0)