AutoSuggest: fix click/append event

Keyboard was fine, it was just mouse events that were broken ^^'
This commit is contained in:
Aaron van Geffen 2023-03-12 01:19:43 +01:00
parent 3cf281b24d
commit 6087ebe249

View File

@ -124,7 +124,7 @@ class AutoSuggest {
node.innerHTML = this.highlightMatches(query_tokens, item.label); node.innerHTML = this.highlightMatches(query_tokens, item.label);
node.jsondata = item; node.jsondata = item;
node.addEventListener('click', event => { node.addEventListener('click', event => {
this.appendCallback(event.target.jsondata); this.appendCallback(node.jsondata);
this.closeContainer(); this.closeContainer();
this.clearInput(); this.clearInput();
}); });