mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2025-12-31 00:10:22 +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 }) => {
|
const FullScreenContainer: React.FC<PropsWithChildren> = useCallback(({ children }) => {
|
||||||
return (
|
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} />
|
<Box position="absolute" w="100%" h="100%" onClick={onPop} />
|
||||||
{children}
|
{children}
|
||||||
</Box>
|
</Box>
|
||||||
|
|||||||
@ -654,7 +654,9 @@ const Inputbar: FC<Props> = ({ assistant: _assistant, setActiveTopic, topic }) =
|
|||||||
}, [addNewTopic, onQuote])
|
}, [addNewTopic, onQuote])
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
textareaRef.current?.focus()
|
if (!document.querySelector('.topview-fullscreen-container')) {
|
||||||
|
textareaRef.current?.focus()
|
||||||
|
}
|
||||||
}, [assistant, topic])
|
}, [assistant, topic])
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user