Procházet zdrojové kódy

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

Kalo Chin před 1 měsícem
rodič
revize
b7583e95a5
1 změnil soubory, kde provedl 1 přidání a 1 odebrání
  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)