Skip to content

Commit

Permalink
Hide popup related vertical cards sooner
Browse files Browse the repository at this point in the history
  • Loading branch information
Woyken committed Jan 29, 2024
1 parent 069f2c3 commit a0a2c1d
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions src/cards/pop-up.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit a0a2c1d

Please sign in to comment.