Skip to content

Commit

Permalink
fix: autoscroll conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
betgo committed Apr 11, 2023
1 parent 9f92968 commit 4269775
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions app/components/chat.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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);
};
Expand Down

0 comments on commit 4269775

Please sign in to comment.