diff --git a/packages/docusaurus-theme-search-algolia/src/theme/SearchBar/index.tsx b/packages/docusaurus-theme-search-algolia/src/theme/SearchBar/index.tsx index 9a3a4ae3bc9a..1d5096a1a007 100644 --- a/packages/docusaurus-theme-search-algolia/src/theme/SearchBar/index.tsx +++ b/packages/docusaurus-theme-search-algolia/src/theme/SearchBar/index.tsx @@ -150,6 +150,7 @@ function DocSearch({ const onClose = useCallback(() => { setIsOpen(false); searchContainer.current?.remove(); + searchButtonRef.current?.focus(); }, [setIsOpen]); const onInput = useCallback(