mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-09-04 22:56:20 +08:00
fix(mobile): error when closing modals
This commit is contained in:
parent
540c1b2207
commit
a83931a421
@ -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();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user