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