From 6903c31b84f8e10d11a6ef54b6cd3eb43b5f6e77 Mon Sep 17 00:00:00 2001 From: yyh <92089059+lyzno1@users.noreply.github.com> Date: Fri, 16 Jan 2026 16:22:14 +0800 Subject: [PATCH] fix(search-input): retain focus after clearing input (#31107) --- web/app/components/base/search-input/index.tsx | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/web/app/components/base/search-input/index.tsx b/web/app/components/base/search-input/index.tsx index fe92a5d092..a2752373f1 100644 --- a/web/app/components/base/search-input/index.tsx +++ b/web/app/components/base/search-input/index.tsx @@ -20,6 +20,7 @@ const SearchInput: FC = ({ white, }) => { const { t } = useTranslation() + const inputRef = useRef(null) const [focus, setFocus] = useState(false) const isComposing = useRef(false) const [compositionValue, setCompositionValue] = useState('') @@ -36,6 +37,7 @@ const SearchInput: FC = ({