fix: autoscroll conflict

This commit is contained in:
betgo 2023-04-11 14:27:34 +08:00
parent 9f92968b96
commit 4269775665
1 changed files with 1 additions and 0 deletions

View File

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