From 972cf847091c7a644cc1352476f38608cf9e06e4 Mon Sep 17 00:00:00 2001 From: Alexejhero <32238504+Alexejhero@users.noreply.github.com> Date: Sat, 15 Jun 2024 16:32:05 +0200 Subject: [PATCH] Hide success modal when clicking outside Co-Authored-By: Zyrenth --- frontend/www/src/modules/modal.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/frontend/www/src/modules/modal.ts b/frontend/www/src/modules/modal.ts index 862f498..bb1e642 100644 --- a/frontend/www/src/modules/modal.ts +++ b/frontend/www/src/modules/modal.ts @@ -90,7 +90,7 @@ export async function openModal(redeem: Redeem | null) { const config = await getConfig(); - cart = { version: config.version, sku: redeem.sku, id: redeem.id, args: {}}; + cart = { version: config.version, sku: redeem.sku, id: redeem.id, args: {} }; $modalWrapper.style.opacity = "1"; $modalWrapper.style.pointerEvents = "unset"; @@ -106,6 +106,7 @@ export async function openModal(redeem: Redeem | null) { setTimeout(() => $modal.classList.add("active-modal"), 10); hideProcessingModal(); + hideSuccessModal(); hideErrorModal(); for (let node of Array.from($modalOptionsForm.childNodes)) $modalOptionsForm.removeChild(node);