diff --git a/src/renderer/src/pages/home/Inputbar/Inputbar.tsx b/src/renderer/src/pages/home/Inputbar/Inputbar.tsx index 0c0e3a9c..8d7a3154 100644 --- a/src/renderer/src/pages/home/Inputbar/Inputbar.tsx +++ b/src/renderer/src/pages/home/Inputbar/Inputbar.tsx @@ -388,6 +388,12 @@ const Inputbar: FC = ({ assistant: _assistant, setActiveTopic }) => { } }, []) + useEffect(() => { + window.addEventListener('focus', () => { + textareaRef.current?.focus() + }) + }, []) + const textareaRows = window.innerHeight >= 1000 || isBubbleStyle ? 2 : 1 const handleKnowledgeBaseSelect = (base?: KnowledgeBase) => {