瀏覽代碼

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

Kalo Chin 1 月之前
父節點
當前提交
b7583e95a5
共有 1 個文件被更改,包括 1 次插入1 次删除
  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)