mirror of https://gitlab.crans.org/bde/nk20
Fix autocompletion not showing up in rare cases
This commit is contained in:
parent
f74b19b2af
commit
eadc8fa193
|
@ -213,15 +213,16 @@ function autoCompleteNote(field_id, note_list_id, notes, notes_display, alias_pr
|
|||
fallbackPlacement: 'clockwise'
|
||||
});
|
||||
|
||||
let old_pattern = null;
|
||||
|
||||
// Clear search on click
|
||||
field.click(function () {
|
||||
field.tooltip('hide');
|
||||
field.removeClass('is-invalid');
|
||||
field.val("");
|
||||
old_pattern = "";
|
||||
});
|
||||
|
||||
let old_pattern = null;
|
||||
|
||||
// When the user type "Enter", the first alias is clicked
|
||||
field.keypress(function (event) {
|
||||
if (event.originalEvent.charCode === 13 && notes.length > 0) {
|
||||
|
|
Loading…
Reference in New Issue