mirror of
https://github.com/Yidadaa/ChatGPT-Next-Web.git
synced 2025-08-20 02:01:26 +08:00
Merge pull request #715 from betgo/bugfix-scrollthumb
fix: autoscroll conflict
This commit is contained in:
@@ -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);
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user