Skip to content

Commit

Permalink
Fix cursor missing issue (#1086)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jerrysmd authored Oct 15, 2023
1 parent b456d77 commit 731cfc9
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions assets/js/theme.js
Original file line number Diff line number Diff line change
Expand Up @@ -225,15 +225,17 @@ function initSearch () {
window._searchDesktopOnce = true
// Turn on the mask when clicking on the search button
searchToggle.addEventListener('click', () => {
loadScript('autocomplete-script', '/lib/autocomplete/autocomplete.min.js', () => initAutosearch())
loadScript('autocomplete-script', '/lib/autocomplete/autocomplete.min.js', () => {
initAutosearch();
searchInput.focus();
})
if (window.config?.search?.type === 'algolia') {
loadScript('algolia-script', '/lib/algoliasearch/algoliasearch-lite.umd.min.js', null)
} else {
loadScript('fuse-script', '/lib/fuse/fuse.min.js', null)
}
document.body.classList.add('blur')
header.classList.add('open')
searchInput.focus()
})
// Clear the search box when clicking on the clear button
searchClear.addEventListener('click', () => {
Expand Down

1 comment on commit 731cfc9

@vercel
Copy link

@vercel vercel bot commented on 731cfc9 Oct 15, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.