Browse Source

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

Kalo Chin 1 month ago
parent
commit
b7583e95a5
1 changed files with 1 additions and 1 deletions
  1. 1 1
      web/app/components/base/chat/chat/index.tsx

+ 1 - 1
web/app/components/base/chat/chat/index.tsx

@@ -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)