diff --git a/apps/web/src/components/ChatView.tsx b/apps/web/src/components/ChatView.tsx index 90aee38189..20aba241b5 100644 --- a/apps/web/src/components/ChatView.tsx +++ b/apps/web/src/components/ChatView.tsx @@ -1140,7 +1140,10 @@ export default function ChatView({ threadId }: ChatViewProps) { }, []); const onMessagesWheel = useCallback((event: WheelEvent) => { if (event.deltaY < 0) { - shouldAutoScrollRef.current = false; + const el = messagesScrollRef.current; + if (el && el.scrollHeight > el.clientHeight) { + shouldAutoScrollRef.current = false; + } } }, []); useLayoutEffect(() => {