on master help sign in
fixed bug: a state where there’s a valid search term, but no results
5bcc390friederjanmoerman
static/scripts.js+5−2
@@ -300,14 +300,17 @@ function initSearch() {
300
300
301 // when typing
301 // when typing
302 searchInput.addEventListener("keyup", debounce(function() {
302 searchInput.addEventListener("keyup", debounce(function() {
303−
304 searchResultsHeader.value = "";
303 searchResultsHeader.value = "";
305
304
306 var term = searchInput.value.trim();
305 var term = searchInput.value.trim();
306+
307+ /*
308+ //removed to fix: a state where there’s a valid search term, but no results
307
309
308 if (term === currentTerm || !index) {
310 if (term === currentTerm || !index) {
309 return;
311 return;
310− }
312+ }*/
313+
311 searchResults.style.display = term === "" ? "none" : "block";
314 searchResults.style.display = term === "" ? "none" : "block";
312 searchResults.style.overflowY = term === "" ? "hidden" : "scroll";
315 searchResults.style.overflowY = term === "" ? "hidden" : "scroll";
313 searchResultsItems.innerHTML = "";
316 searchResultsItems.innerHTML = "";