fix: adjust scroll detection threshold in chat component (#14640)

pull/15139/head
Kalo Chin 1 year ago committed by GitHub
parent 9437a1a844
commit b7583e95a5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -186,7 +186,7 @@ const Chat: FC<ChatProps> = ({
if (chatContainer) {
const setUserScrolled = () => {
if (chatContainer)
userScrolledRef.current = chatContainer.scrollHeight - chatContainer.scrollTop >= chatContainer.clientHeight + 300
userScrolledRef.current = chatContainer.scrollHeight - chatContainer.scrollTop > chatContainer.clientHeight
}
chatContainer.addEventListener('scroll', setUserScrolled)
return () => chatContainer.removeEventListener('scroll', setUserScrolled)

Loading…
Cancel
Save