jump to note list: Use a fixed container instead of dropdown

This commit is contained in:
Elian Doran
2023-08-26 17:03:09 +03:00
parent c551eae651
commit abbd0b50eb
2 changed files with 15 additions and 2 deletions

View File

@@ -137,8 +137,15 @@ function initNoteAutocomplete($el, options) {
return false;
});
let autocompleteOptions = {};
if (options.container) {
autocompleteOptions.dropdownMenuContainer = options.container;
} else {
autocompleteOptions.appendTo = document.querySelector('body');
}
$el.autocomplete({
appendTo: document.querySelector('body'),
...autocompleteOptions,
hint: false,
autoselect: true,
// openOnFocus has to be false, otherwise re-focus (after return from note type chooser dialog) forces