Skip to content

Commit

Permalink
Fix search blur
Browse files Browse the repository at this point in the history
  • Loading branch information
oodamien committed Oct 21, 2024
1 parent 75f4d6d commit efb65ba
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/components/common/search/Search.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ function SearchBox(props) {
onSubmit={event => {
event.preventDefault()
event.stopPropagation()

if (inputRef.current) {
inputRef.current.blur()
}
Expand Down Expand Up @@ -117,7 +116,11 @@ export default function Search({ algoliaVersion, onBlurHandler }) {
return (
<InstantSearch searchClient={searchClient} indexName='dataflow-spring'>
<SearchBox
onBlurHandler={onBlurHandler}
onBlurHandler={() => {
setTimeout(() => {
onBlurHandler()
}, 10)
}}
onQueryHandler={query => {
setShow(!!query.trim())
}}
Expand Down

0 comments on commit efb65ba

Please sign in to comment.