docs: fix search not opening sometimes (#13118)
This commit is contained in:
@@ -80,7 +80,9 @@ export const AiAssistantChatWindowInput = ({
|
||||
|
||||
useEffect(() => {
|
||||
adjustTextareaHeight()
|
||||
inputRef.current?.focus()
|
||||
if (chatOpened) {
|
||||
inputRef.current?.focus()
|
||||
}
|
||||
}, [question])
|
||||
|
||||
const handleTouch = (e: React.TouchEvent<HTMLTextAreaElement>) => {
|
||||
|
||||
@@ -131,9 +131,11 @@ const AiAssistantInnerProvider = ({
|
||||
useEffect(() => {
|
||||
setOnCompleteAction(() => {
|
||||
scrollToBottom()
|
||||
inputRef.current?.focus({
|
||||
preventScroll: true,
|
||||
})
|
||||
if (chatOpened) {
|
||||
inputRef.current?.focus({
|
||||
preventScroll: true,
|
||||
})
|
||||
}
|
||||
})
|
||||
}, [scrollToBottom])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user