This commit is contained in:
GH Action - Upstream Sync 2023-04-12 03:13:53 +00:00
commit 9076bd587c

View File

@ -354,6 +354,7 @@ export function Chat(props: {
const [hitBottom, setHitBottom] = useState(false); const [hitBottom, setHitBottom] = useState(false);
const onChatBodyScroll = (e: HTMLElement) => { const onChatBodyScroll = (e: HTMLElement) => {
setAutoScroll(false);
const isTouchBottom = e.scrollTop + e.clientHeight >= e.scrollHeight - 20; const isTouchBottom = e.scrollTop + e.clientHeight >= e.scrollHeight - 20;
setHitBottom(isTouchBottom); setHitBottom(isTouchBottom);
}; };