Vanessa 2025-07-23 13:08:38 +08:00
parent c88f99646c
commit 508eb93183
33 changed files with 111 additions and 108 deletions

View file

@ -25,7 +25,7 @@ export const confirmDialog = (title: string, text: string,
dialog.element.addEventListener("click", (event) => {
let target = event.target as HTMLElement;
const isDispatch = typeof event.detail === "string";
while (target && (target !== dialog.element) || isDispatch) {
while (target && target !== dialog.element || isDispatch) {
if (target.id === "cancelDialogConfirmBtn" || (isDispatch && event.detail=== "Escape")) {
if (cancel) {
cancel(dialog);