Fix confirm modal close initialization error

This commit is contained in:
2026-02-06 23:23:31 +01:00
parent b2b3996d78
commit 5895d66179

View File

@@ -762,6 +762,7 @@ export function openConfirmModal({ title, body, confirmLabel, cancelLabel = t("m
<p>${body}</p> <p>${body}</p>
</div> </div>
`; `;
const close = () => overlay.remove();
const actions = document.createElement("div"); const actions = document.createElement("div");
actions.className = "stack horizontal"; actions.className = "stack horizontal";
const confirmBtn = document.createElement("button"); const confirmBtn = document.createElement("button");
@@ -777,7 +778,6 @@ export function openConfirmModal({ title, body, confirmLabel, cancelLabel = t("m
} }
panel.querySelector(".edit-body")?.appendChild(actions); panel.querySelector(".edit-body")?.appendChild(actions);
const close = () => overlay.remove();
overlay.addEventListener("click", (e) => { overlay.addEventListener("click", (e) => {
if ( if (
e.target.classList.contains("edit-modal") || e.target.classList.contains("edit-modal") ||