Prevent Enter on search box from reloading page

Fixes #2678
This commit is contained in:
Nick O'Leary 2020-09-03 11:22:41 +01:00
parent ec368ae3fd
commit 3b9065b057
No known key found for this signature in database
GPG Key ID: 4F2157149161A6C9
1 changed files with 3 additions and 0 deletions

View File

@ -119,6 +119,9 @@
if (evt.keyCode === 27) {
that.element.val("");
}
if (evt.keyCode === 13) {
evt.preventDefault();
}
})
this.element.on("keyup",function(evt) {
that._change($(this).val());