Skip to content

Commit

Permalink
Merge pull request ChatGPTNextWeb#715 from betgo/bugfix-scrollthumb
Browse files Browse the repository at this point in the history
fix: autoscroll conflict
  • Loading branch information
Yidadaa authored Apr 12, 2023
2 parents 88fff82 + 4269775 commit a15bd3c
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 a15bd3c

Please sign in to comment.