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:
parent
d102578b54
commit
e0a04acb06
1 changed files with 3 additions and 1 deletions
|
@ -147,7 +147,9 @@ class AutoCompleteControl {
|
||||||
let func = null;
|
let func = null;
|
||||||
if (this._isVisible) {
|
if (this._isVisible) {
|
||||||
if (key === KEY_ESCAPE) {
|
if (key === KEY_ESCAPE) {
|
||||||
func = this.hide;
|
func = () => {
|
||||||
|
this.hide();
|
||||||
|
};
|
||||||
} else if (key === KEY_TAB && shift) {
|
} else if (key === KEY_TAB && shift) {
|
||||||
func = () => {
|
func = () => {
|
||||||
this._selectPrevious();
|
this._selectPrevious();
|
||||||
|
|
Loading…
Reference in a new issue