fix(client): delete modal crashing

This commit is contained in:
Elian Doran 2024-12-22 00:34:25 +02:00
parent 4e75ba78b4
commit 4563366732
No known key found for this signature in database

View File

@ -206,7 +206,7 @@ function closeActiveDialog() {
if (glob.activeDialog) {
// TODO: Fix once we use proper ES imports.
//@ts-ignore
Modal.getOrCreateInstance(glob.activeDialog[0]).hide();
bootstrap.Modal.getOrCreateInstance(glob.activeDialog[0]).hide();
glob.activeDialog = null;
}
}
@ -252,7 +252,7 @@ async function openDialog($dialog: JQuery<HTMLElement>, closeActDialog = true) {
saveFocusedElement();
// TODO: Fix once we use proper ES imports.
//@ts-ignore
Modal.getOrCreateInstance($dialog[0]).show();
bootstrap.Modal.getOrCreateInstance($dialog[0]).show();
$dialog.on('hidden.bs.modal', () => {
$(".aa-input").autocomplete("close");