mirror of https://github.com/langgenius/dify.git
fix: adjust scroll detection threshold in chat component (#14640)
This commit is contained in:
parent
9437a1a844
commit
b7583e95a5
|
|
@ -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…
Reference in New Issue