fix: correct chat input cursor behavior when content is scrollable (#3979)
This commit is contained in:
parent
387f140ba8
commit
ebad6c3e93
@ -269,6 +269,10 @@ const RichTextEditor = ({
|
|||||||
? '100px'
|
? '100px'
|
||||||
: '40px'
|
: '40px'
|
||||||
textareaRef.current.style.height = textareaRef.current.scrollHeight + 'px'
|
textareaRef.current.style.height = textareaRef.current.scrollHeight + 'px'
|
||||||
|
textareaRef.current?.scrollTo({
|
||||||
|
top: textareaRef.current.scrollHeight,
|
||||||
|
behavior: 'instant',
|
||||||
|
})
|
||||||
textareaRef.current.style.overflow =
|
textareaRef.current.style.overflow =
|
||||||
textareaRef.current.clientHeight >= 390 ? 'auto' : 'hidden'
|
textareaRef.current.clientHeight >= 390 ? 'auto' : 'hidden'
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user