Skip to content

Commit 05ab4e1

Browse files
ahornaceVladimir Kotal
authored andcommitted
Do not refresh suggestions on empty field when pressed esc key
1 parent b7bbebc commit 05ab4e1

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

web/js/utils-0.0.23.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1877,7 +1877,8 @@ function initAutocompleteForField(inputId, field, config, dataFunction, errorEle
18771877
if (e.keyCode === 37 || e.keyCode === 39) { // left or right arrow key
18781878
$(this).autocomplete('search', $(this).val());
18791879
}
1880-
if (input.val() === "") { // try to refresh on empty input (error might go away)
1880+
// try to refresh on empty input (error might go away) except when pressed esc key
1881+
if (input.val() === "" && e.keyCode !== 27) {
18811882
$(this).autocomplete('search', ' ');
18821883
}
18831884
});

0 commit comments

Comments
 (0)