Prevent default for up and down keys

This commit is contained in:
Daoud Clarke 2021-12-20 23:21:40 +00:00
parent 8f8fc43c9f
commit f754b38f71

View file

@ -36,8 +36,10 @@ window.onload = (event) => {
console.log("Key press", e);
if (e.key == 'ArrowDown') {
selectNextItem();
e.preventDefault();
} else if (e.key == 'ArrowUp') {
selectPreviousItem();
e.preventDefault();
} else if (e.key == 'Enter') {
// const form = document.getElementById('search-form');
// form.submit();