Skip to content

Commit

Permalink
fix: blur input field
Browse files Browse the repository at this point in the history
  • Loading branch information
shanpriyan committed Dec 24, 2022
1 parent 7d625ab commit 1a281ce
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/assets/js/search.js
Expand Up @@ -168,6 +168,8 @@ document.addEventListener('keydown', function (e) {
if (searchResults.length) {
clearSearchResults();
searchInput.focus();
} else if (!searchResults.length && document.activeElement === searchInput) {
searchInput.blur()
}
}

Expand Down

0 comments on commit 1a281ce

Please sign in to comment.