Improve search result keyboard styling

This commit is contained in:
Richard Feldman 2024-11-29 12:57:55 -05:00
parent 0bf5c0aa59
commit 9662b4b11d
No known key found for this signature in database
GPG key ID: DAC334802F365236
2 changed files with 10 additions and 11 deletions

View file

@ -148,9 +148,13 @@
// De-focus and clear input box
searchBox.value = "";
searchBox.blur();
} else if (searchTypeAhead.contains(document.activeElement)) {
} else {
// Hide the search results
searchTypeAhead.classList.add("hidden");
searchBox.focus();
if (searchTypeAhead.contains(document.activeElement)) {
searchBox.focus();
}
}
}
});