Skip to content

Commit

Permalink
fix: correct chat input cursor behavior when content is scrollable
Browse files Browse the repository at this point in the history
  • Loading branch information
urmauur committed Nov 8, 2024
1 parent 5271c9f commit 3df8f0b
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,10 @@ const RichTextEditor = ({
? '100px'
: '40px'
textareaRef.current.style.height = textareaRef.current.scrollHeight + 'px'
textareaRef.current?.scrollTo({
top: textareaRef.current.scrollHeight,
behavior: 'instant',
})
textareaRef.current.style.overflow =
textareaRef.current.clientHeight >= 390 ? 'auto' : 'hidden'
}
Expand Down

0 comments on commit 3df8f0b

Please sign in to comment.