From efb65baafa3f04b601308823fff58409fde48a80 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..047031fe 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() + }, 10) + }} onQueryHandler={query => { setShow(!!query.trim()) }}