Minor addition to search.
This commit is contained in:
parent
3a9dd7b915
commit
fc4d3ebfe6
1 changed files with 6 additions and 0 deletions
|
|
@ -75,6 +75,12 @@
|
|||
searchButton.disabled = searchText.value == "";
|
||||
});
|
||||
|
||||
searchText.addEventListener('keypress', (event) => {
|
||||
if (event.key === "Enter") {
|
||||
location.href=`{{ url_for('search.search') }}?q=${searchText.value}`;
|
||||
}
|
||||
});
|
||||
|
||||
searchButton.addEventListener('click', () => {
|
||||
location.href=`{{ url_for('search.search') }}?q=${searchText.value}`;
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue