From fe0cf3601ada6958defe7411d873861302124c91 Mon Sep 17 00:00:00 2001 From: Ashvin Jangid <142579833+ashvwinn@users.noreply.github.com> Date: Sat, 11 Jul 2026 16:15:20 +0530 Subject: [PATCH] gh-14544: Fix essentials promo ui leaving gap on pressing esc (gh-14547) Fixes https://github.com/zen-browser/desktop/issues/14544 Also fixes essentials promo having weird ui with container specific essentials https://github.com/user-attachments/assets/f6df3e48-5fa2-471e-afbb-2472efa0620b --- src/zen/spaces/ZenSpaceManager.mjs | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/src/zen/spaces/ZenSpaceManager.mjs b/src/zen/spaces/ZenSpaceManager.mjs index 0a3d8ca1c..91944c83e 100644 --- a/src/zen/spaces/ZenSpaceManager.mjs +++ b/src/zen/spaces/ZenSpaceManager.mjs @@ -460,16 +460,19 @@ class nsZenWorkspaces { document .getElementById("zen-essentials") .appendChild(essentialsContainer); - - // Set an initial hidden state if the essentials section is not supposed - // to be shown on the current workspace - if ( - this.containerSpecificEssentials && - this.getActiveWorkspaceFromCache()?.containerTabId != container - ) { - essentialsContainer.setAttribute("hidden", "true"); - } } + + // Set a hidden state if the essentials section is not supposed + // to be shown on the current workspace, else remove the hidden state + if ( + this.containerSpecificEssentials && + this.getActiveWorkspaceFromCache()?.containerTabId != container + ) { + essentialsContainer.setAttribute("hidden", "true"); + } else { + essentialsContainer.removeAttribute("hidden"); + } + return essentialsContainer; }