Skip to content

Commit 5b419fa

Browse files
committed
Fix search blur
1 parent 75f4d6d commit 5b419fa

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/components/common/search/Search.js

+5-2
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,6 @@ function SearchBox(props) {
7878
onSubmit={event => {
7979
event.preventDefault()
8080
event.stopPropagation()
81-
8281
if (inputRef.current) {
8382
inputRef.current.blur()
8483
}
@@ -117,7 +116,11 @@ export default function Search({ algoliaVersion, onBlurHandler }) {
117116
return (
118117
<InstantSearch searchClient={searchClient} indexName='dataflow-spring'>
119118
<SearchBox
120-
onBlurHandler={onBlurHandler}
119+
onBlurHandler={() => {
120+
setTimeout(() => {
121+
onBlurHandler()
122+
}, 1000)
123+
}}
121124
onQueryHandler={query => {
122125
setShow(!!query.trim())
123126
}}

0 commit comments

Comments
 (0)