hide search-results on blur (#1488)
This commit is contained in:
parent
7fab9b4774
commit
635159114d
6
docs/static/search.js
vendored
6
docs/static/search.js
vendored
|
@ -168,6 +168,12 @@ function initSearch() {
|
|||
$searchResultsItems.appendChild(item);
|
||||
}
|
||||
}, 150));
|
||||
|
||||
window.addEventListener('click', function(e) {
|
||||
if ($searchResults.style.display == "block" && !$searchResults.contains(e.target)) {
|
||||
$searchResults.style.display = "none";
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue