diff --git a/src/browser/base/content/zen-styles/zen-compact-mode.css b/src/browser/base/content/zen-styles/zen-compact-mode.css index 32d9fca83..6fac7e8ad 100644 --- a/src/browser/base/content/zen-styles/zen-compact-mode.css +++ b/src/browser/base/content/zen-styles/zen-compact-mode.css @@ -113,6 +113,7 @@ & #urlbar[open][zen-floating-urlbar='true'] { transition: left 0.05s ease; + visibility: visible; #navigator-toolbox:has(&) { opacity: 1; @@ -134,17 +135,18 @@ } } - #navigator-toolbox[zen-has-hover], + #navigator-toolbox[zen-has-hover]:not(:has(#urlbar[zen-floating-urlbar='true']:hover)), #navigator-toolbox[zen-user-show], + #navigator-toolbox[zen-has-empty-tab], #navigator-toolbox[flash-popup], #navigator-toolbox[has-popup-menu], #navigator-toolbox[movingtab], #navigator-toolbox:has(.tabbrowser-tab:active), &[zen-renaming-tab='true'] #navigator-toolbox, #navigator-toolbox:has( - *:is([panelopen='true'], [open='true'], #urlbar:not([zen-floating-urlbar='true']):focus-within):not(tab):not(.zen-compact-mode-ignore) + *:is([panelopen='true'], [open='true'], #urlbar:focus-within):not(#urlbar[zen-floating-urlbar='true']):not(tab):not(.zen-compact-mode-ignore) ) { - &:not([animate='true']):not(:has(#urlbar[zen-floating-urlbar='true']:hover)) { + &:not([animate='true']) { --zen-compact-mode-func: linear( 0 0%, 0.002748 1%, diff --git a/src/browser/base/zen-components/ZenCompactMode.mjs b/src/browser/base/zen-components/ZenCompactMode.mjs index f5463c081..a88b25032 100644 --- a/src/browser/base/zen-components/ZenCompactMode.mjs +++ b/src/browser/base/zen-components/ZenCompactMode.mjs @@ -158,6 +158,7 @@ var gZenCompactModeManager = { const canAnimate = lazyCompactMode.COMPACT_MODE_CAN_ANIMATE_SIDEBAR && !this.sidebar.hasAttribute('zen-user-show') && + !this.sidebar.hasAttribute('zen-has-empty-tab') && !this.sidebar.hasAttribute('zen-has-hover'); // Do this so we can get the correct width ONCE compact mode styled have been applied if (canAnimate) { @@ -191,15 +192,17 @@ var gZenCompactModeManager = { ) .then(() => { window.requestAnimationFrame(() => { + this.sidebar.style.transition = 'none'; this.sidebar.removeAttribute('animate'); + this.sidebar.style.visibility = 'hidden'; this.sidebar.style.removeProperty('margin-right'); this.sidebar.style.removeProperty('margin-left'); this.sidebar.style.removeProperty('transform'); - this.sidebar.style.transition = 'none'; setTimeout(() => { this._animating = false; + this.sidebar.style.removeProperty('visibility'); this.sidebar.style.removeProperty('transition'); - }); + }, 300); }); }); } else if (canHideSidebar && !isCompactMode) { diff --git a/src/browser/base/zen-components/ZenWorkspaces.mjs b/src/browser/base/zen-components/ZenWorkspaces.mjs index e1cf0a825..3d7a7a530 100644 --- a/src/browser/base/zen-components/ZenWorkspaces.mjs +++ b/src/browser/base/zen-components/ZenWorkspaces.mjs @@ -1967,6 +1967,7 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature { } async onLocationChange(browser) { + gZenCompactModeManager.sidebar.toggleAttribute('zen-has-empty-tab', gBrowser.selectedTab.hasAttribute('zen-empty-tab')); if (!this.workspaceEnabled || this._inChangingWorkspace || this._isClosingWindow) { return; }