Fix confirm modal close initialization error
This commit is contained in:
@@ -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") ||
|
||||||
|
|||||||
Reference in New Issue
Block a user