diff --git a/views/pages/results.ejs b/views/pages/results.ejs index 7622564..dfd6045 100644 --- a/views/pages/results.ejs +++ b/views/pages/results.ejs @@ -29,9 +29,11 @@ _ / / / _ /_/ /_ / _ / / __/ / / / /_ - + + +
Found <%= results.items.length %> result<%= results.items.length != 1 ? 's': '' %> in <%= results.elapsed %> seconds. <%= indexing ? "Indexing in progress, if the list is missing something please try reloading in a few minutes" : "" %>
diff --git a/views/partials/head.ejs b/views/partials/head.ejs index 14b8e94..cb0cff5 100644 --- a/views/partials/head.ejs +++ b/views/partials/head.ejs @@ -157,6 +157,7 @@ listElem.addEventListener('click', (e) => { searchElem.value = listElem.innerText suggestionList.style.display = 'none' + selectedSuggestion = null totalSuggestions = 0 }) listElem.addEventListener('mouseover', (e) => { @@ -187,7 +188,7 @@ searchElem.addEventListener('keyup', function (e) { if(e.key === 'Escape'){ return - } + } if(e.key === 'ArrowUp'){ if(!totalSuggestions) return if(typeof selectedSuggestion != 'number'){ @@ -263,6 +264,8 @@ clearSelects() document.getElementById('search').value = document.getElementById(suggestId).innerText selectedSuggestion = null + suggestionList.style.display = 'none' + totalSugges tions = 0 } function clearSelects(){ let suggestionList = document.getElementById('suggestionList')