From 2dd0f3ebe3e7bba9c552f83a0a09ed4c1305bb6b Mon Sep 17 00:00:00 2001 From: Damien Vitrac Date: Mon, 21 Oct 2024 16:32:01 +0200 Subject: [PATCH] Fix search blur --- src/components/common/search/Search.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/components/common/search/Search.js b/src/components/common/search/Search.js index 17fedf2a..4bfaf4bb 100644 --- a/src/components/common/search/Search.js +++ b/src/components/common/search/Search.js @@ -78,7 +78,6 @@ function SearchBox(props) { onSubmit={event => { event.preventDefault() event.stopPropagation() - if (inputRef.current) { inputRef.current.blur() } @@ -117,7 +116,11 @@ export default function Search({ algoliaVersion, onBlurHandler }) { return ( { + setTimeout(() => { + onBlurHandler() + }, 100) + }} onQueryHandler={query => { setShow(!!query.trim()) }}