From a0a2c1d0a0e5c845e7d18e5bb6c426e55c6a8435 Mon Sep 17 00:00:00 2001 From: Woyken <13166802+Woyken@users.noreply.github.com> Date: Mon, 29 Jan 2024 15:36:48 +0200 Subject: [PATCH] Hide popup related vertical cards sooner --- src/cards/pop-up.ts | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/cards/pop-up.ts b/src/cards/pop-up.ts index 1b8de39..87283e5 100644 --- a/src/cards/pop-up.ts +++ b/src/cards/pop-up.ts @@ -34,6 +34,16 @@ export function handlePopUp(context) { return; } + if (context.errorTriggered) { + return; + } + + if (!context.initStyleAdded && !context.popUp && !editor) { + // Hide vertical stack content before initialization + context.card.style.marginTop = '4000px'; + context.initStyleAdded = true; + } + let { customStyles, entityId, @@ -84,16 +94,6 @@ export function handlePopUp(context) { let closeTimeout; let rgbaBgColor; - if (context.errorTriggered) { - return; - } - - if (!context.initStyleAdded && !context.popUp && !editor) { - // Hide vertical stack content before initialization - context.card.style.marginTop = '4000px'; - context.initStyleAdded = true; - } - function removeHash() { history.replaceState(null, null, location.href.split('#')[0]); fireEvent(window, "location-changed", true);