diff --git a/_dev/src/ts/components/DialogContainer.ts b/_dev/src/ts/components/DialogContainer.ts index efc251d26..cbe4e55b6 100644 --- a/_dev/src/ts/components/DialogContainer.ts +++ b/_dev/src/ts/components/DialogContainer.ts @@ -59,7 +59,7 @@ export default class DialogContainer implements DomLifecycle { } #closeDialog(ev: Event): void { - scriptHandler.unloadScriptType(ScriptType.DIALOG); + setTimeout(() => scriptHandler.unloadScriptType(ScriptType.DIALOG), 0); const dialog = ev.target as HTMLDialogElement; if (dialog) { dialog.close();