client/search: fix js error when pressing esc key

`this` became inaccessible from hide() when the function was called
from outside.
Note: I don't like the behavior of Escape and Delete, as pressing them
more than once reverses their action.
This commit is contained in:
Eva 2023-05-21 14:28:14 +02:00
parent d102578b54
commit e0a04acb06

View file

@ -147,7 +147,9 @@ class AutoCompleteControl {
let func = null;
if (this._isVisible) {
if (key === KEY_ESCAPE) {
func = this.hide;
func = () => {
this.hide();
};
} else if (key === KEY_TAB && shift) {
func = () => {
this._selectPrevious();