We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 379aba0 commit 5261260Copy full SHA for 5261260
1 file changed
static/assets/js/search.js
@@ -37,21 +37,13 @@ document.addEventListener("DOMContentLoaded", () => {
37
document.addEventListener("mousedown", (e) => {
38
if (!searchInput.contains(e.target) && !searchResults.contains(e.target)) {
39
searchResults.style.display = "none";
40
- } else {
41
- // If input is not empty search again
42
- displayResults();
43
}
44
});
45
46
searchInput.addEventListener("focusin", (e) => {
47
displayResults();
48
49
50
- searchInput.addEventListener("focusout", (e) => {
51
- searchResults.style.display = "none";
52
- });
53
-
54
55
function displayResults() {
56
if (results.length === 0) {
57
searchResults.innerHTML = `<div style="padding: 0.5em; color: var(--text-colour);">No results found</div>`;
0 commit comments