From 1eb48dfbaf5c60226acb0a73a6b458fee007a2de Mon Sep 17 00:00:00 2001 From: ousugo Date: Sat, 22 Feb 2025 13:19:48 +0800 Subject: [PATCH] fix: Restore textarea focus after selecting mention model via mouse --- src/renderer/src/pages/home/Inputbar/Inputbar.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/renderer/src/pages/home/Inputbar/Inputbar.tsx b/src/renderer/src/pages/home/Inputbar/Inputbar.tsx index e624bb96a9..c44d6aff0c 100644 --- a/src/renderer/src/pages/home/Inputbar/Inputbar.tsx +++ b/src/renderer/src/pages/home/Inputbar/Inputbar.tsx @@ -487,6 +487,9 @@ const Inputbar: FC = ({ assistant: _assistant, setActiveTopic }) => { setMentionModels((prev) => [...prev, model]) setIsMentionPopupOpen(false) + setTimeout(() => { + textareaRef.current?.focus() + }, 0) } }