mirror of
https://github.com/zadam/trilium.git
synced 2025-11-11 07:45:51 +01:00
fix(mobile): error when closing modals
This commit is contained in:
@@ -255,7 +255,10 @@ async function openDialog($dialog: JQuery<HTMLElement>, closeActDialog = true) {
|
|||||||
bootstrap.Modal.getOrCreateInstance($dialog[0]).show();
|
bootstrap.Modal.getOrCreateInstance($dialog[0]).show();
|
||||||
|
|
||||||
$dialog.on('hidden.bs.modal', () => {
|
$dialog.on('hidden.bs.modal', () => {
|
||||||
$(".aa-input").autocomplete("close");
|
const $autocompleteEl = $(".aa-input");
|
||||||
|
if ("autocomplete" in $autocompleteEl) {
|
||||||
|
$autocompleteEl.autocomplete("close");
|
||||||
|
}
|
||||||
|
|
||||||
if (!glob.activeDialog || glob.activeDialog === $dialog) {
|
if (!glob.activeDialog || glob.activeDialog === $dialog) {
|
||||||
focusSavedElement();
|
focusSavedElement();
|
||||||
|
|||||||
Reference in New Issue
Block a user