From b84f7bf596eeeb4dd60500a3dcc199f59263d64a Mon Sep 17 00:00:00 2001 From: kangfenmao Date: Sun, 8 Jun 2025 11:37:38 +0800 Subject: [PATCH] fix: prevent textarea from focusing when in fullscreen mode --- src/renderer/src/components/TopView/index.tsx | 2 +- src/renderer/src/pages/home/Inputbar/Inputbar.tsx | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/renderer/src/components/TopView/index.tsx b/src/renderer/src/components/TopView/index.tsx index 4638e0db02..91d5cc42cd 100644 --- a/src/renderer/src/components/TopView/index.tsx +++ b/src/renderer/src/components/TopView/index.tsx @@ -65,7 +65,7 @@ const TopViewContainer: React.FC = ({ children }) => { const FullScreenContainer: React.FC = useCallback(({ children }) => { return ( - + {children} diff --git a/src/renderer/src/pages/home/Inputbar/Inputbar.tsx b/src/renderer/src/pages/home/Inputbar/Inputbar.tsx index e127cc375d..83b3373093 100644 --- a/src/renderer/src/pages/home/Inputbar/Inputbar.tsx +++ b/src/renderer/src/pages/home/Inputbar/Inputbar.tsx @@ -654,7 +654,9 @@ const Inputbar: FC = ({ assistant: _assistant, setActiveTopic, topic }) = }, [addNewTopic, onQuote]) useEffect(() => { - textareaRef.current?.focus() + if (!document.querySelector('.topview-fullscreen-container')) { + textareaRef.current?.focus() + } }, [assistant, topic]) useEffect(() => {