mirror of
https://github.com/zen-browser/desktop.git
synced 2026-05-05 13:35:10 +00:00
fix: Fixed compact mode sidebar infinitily expanding when creating a new workspace, b=no-bug, c=compact-mode, workspaces
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
// License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
pref('zen.view.sidebar-height-throttle', 200); // in ms
|
||||
pref('zen.view.sidebar-height-throttle', 0); // in ms
|
||||
pref('zen.view.sidebar-expanded.max-width', 500);
|
||||
|
||||
#ifdef XP_MACOSX
|
||||
|
||||
@@ -215,8 +215,9 @@ var gZenCompactModeManager = {
|
||||
let sidebarWidth = this.sidebar.getBoundingClientRect().width;
|
||||
const shouldRecalculate =
|
||||
this.preference || document.documentElement.hasAttribute('zen-creating-workspace');
|
||||
const sidebarExpanded = document.documentElement.hasAttribute('zen-sidebar-expanded');
|
||||
if (sidebarWidth > 1) {
|
||||
if (shouldRecalculate && gZenVerticalTabsManager._prefsSidebarExpanded) {
|
||||
if (shouldRecalculate && sidebarExpanded) {
|
||||
sidebarWidth = Math.max(sidebarWidth, 150);
|
||||
}
|
||||
// Second variable to get the genuine width of the sidebar
|
||||
@@ -225,7 +226,7 @@ var gZenCompactModeManager = {
|
||||
if (
|
||||
event &&
|
||||
shouldRecalculate &&
|
||||
gZenVerticalTabsManager._prefsSidebarExpanded &&
|
||||
sidebarExpanded &&
|
||||
!gZenVerticalTabsManager._hadSidebarCollapse
|
||||
) {
|
||||
return;
|
||||
|
||||
@@ -170,6 +170,7 @@
|
||||
document.getElementById('nav-bar').style.visibility = 'collapse';
|
||||
}
|
||||
this.style.visibility = 'visible';
|
||||
gZenCompactModeManager.getAndApplySidebarWidth();
|
||||
this.resolveInitialized();
|
||||
gZenUIManager.motion
|
||||
.animate(
|
||||
|
||||
Reference in New Issue
Block a user