Skip to content

Commit

Permalink
fix: adjust scroll detection threshold in chat component (langgenius#…
Browse files Browse the repository at this point in the history
  • Loading branch information
fdb02983rhy authored Mar 6, 2025
1 parent 9437a1a commit b7583e9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion web/app/components/base/chat/chat/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit b7583e9

Please sign in to comment.