Skip to content

Commit

Permalink
Merge pull request #374 from Woyken/main
Browse files Browse the repository at this point in the history
Hide popup related vertical cards sooner
  • Loading branch information
Clooos authored Jan 31, 2024
2 parents 069f2c3 + a0a2c1d commit d5ed782
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 d5ed782

Please sign in to comment.