mirror of
https://github.com/rr-/szurubooru.git
synced 2025-07-17 08:26:24 +00:00
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:
@ -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();
|
||||||
|
Reference in New Issue
Block a user