fix: prevent textarea from focusing when in fullscreen mode

This commit is contained in:
kangfenmao 2025-06-08 11:37:38 +08:00
parent c1d753b7fe
commit b84f7bf596
2 changed files with 4 additions and 2 deletions

View File

@ -65,7 +65,7 @@ const TopViewContainer: React.FC<Props> = ({ children }) => {
const FullScreenContainer: React.FC<PropsWithChildren> = useCallback(({ children }) => {
return (
<Box flex={1} position="absolute" w="100%" h="100%">
<Box flex={1} position="absolute" w="100%" h="100%" className="topview-fullscreen-container">
<Box position="absolute" w="100%" h="100%" onClick={onPop} />
{children}
</Box>

View File

@ -654,7 +654,9 @@ const Inputbar: FC<Props> = ({ assistant: _assistant, setActiveTopic, topic }) =
}, [addNewTopic, onQuote])
useEffect(() => {
textareaRef.current?.focus()
if (!document.querySelector('.topview-fullscreen-container')) {
textareaRef.current?.focus()
}
}, [assistant, topic])
useEffect(() => {