Skip to content

Commit

Permalink
fix #921: disable enter key in filter search
Browse files Browse the repository at this point in the history
  • Loading branch information
groovecoder authored and maxxcrawford committed Aug 3, 2021
1 parent 212e4b7 commit 3a6626b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions static/js/filter.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,12 @@
filterLabelTotalCases.textContent = aliases.length;

filterInput.addEventListener("input", filterInputWatcher, false);
filterInput.addEventListener("keydown", e => {
if(e.keyIdentifier=='U+000A'||e.keyIdentifier=='Enter'||e.keyCode==13){
e.preventDefault();
return false;
}
});

filterResetButton.addEventListener("click", resetFilter, false);
}
Expand Down

0 comments on commit 3a6626b

Please sign in to comment.