mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2025-12-24 10:40:07 +08:00
fix: prevent textarea from focusing when in fullscreen mode
This commit is contained in:
parent
c1d753b7fe
commit
b84f7bf596
@ -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>
|
||||
|
||||
@ -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(() => {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user