Allow normal form submit with the enter key

This commit is contained in:
Magnus Hoff 2017-10-25 13:53:16 +02:00
parent 2939dfaf9c
commit 0a3dc9d10f

View file

@ -18,11 +18,6 @@ function debouncer(interval, callback) {
const results = form.querySelector('.live-results'); const results = form.querySelector('.live-results');
const resultPrototype = document.getElementById('search-result-prototype').firstChild; const resultPrototype = document.getElementById('search-result-prototype').firstChild;
form.addEventListener('submit', function (ev) {
ev.preventDefault();
ev.stopPropagation();
});
function submit() { function submit() {
if (input.value === "") { if (input.value === "") {
results.classList.remove("show"); results.classList.remove("show");