| ... | @@ -2166,13 +2166,13 @@ export default function ChatView({ threadId }: ChatViewProps) { | ... | @@ -2166,13 +2166,13 @@ export default function ChatView({ threadId }: ChatViewProps) { |
| 2166 | pendingUserScrollUpIntentRef.current = false; | 2166 | pendingUserScrollUpIntentRef.current = false; |
| 2167 | } else if (shouldAutoScrollRef.current && pendingUserScrollUpIntentRef.current) { | 2167 | } else if (shouldAutoScrollRef.current && pendingUserScrollUpIntentRef.current) { |
| 2168 | const scrolledUp = currentScrollTop < lastKnownScrollTopRef.current - 1; | 2168 | const scrolledUp = currentScrollTop < lastKnownScrollTopRef.current - 1; |
| 2169 | if (scrolledUp) { | 2169 | if (scrolledUp && !isNearBottom) { |
| 2170 | shouldAutoScrollRef.current = false; | 2170 | shouldAutoScrollRef.current = false; |
| 2171 | } | 2171 | } |
| 2172 | pendingUserScrollUpIntentRef.current = false; | 2172 | pendingUserScrollUpIntentRef.current = false; |
| 2173 | } else if (shouldAutoScrollRef.current && isPointerScrollActiveRef.current) { | 2173 | } else if (shouldAutoScrollRef.current && isPointerScrollActiveRef.current) { |
| 2174 | const scrolledUp = currentScrollTop < lastKnownScrollTopRef.current - 1; | 2174 | const scrolledUp = currentScrollTop < lastKnownScrollTopRef.current - 1; |
| 2175 | if (scrolledUp) { | 2175 | if (scrolledUp && !isNearBottom) { |
| 2176 | shouldAutoScrollRef.current = false; | 2176 | shouldAutoScrollRef.current = false; |
| 2177 | } | 2177 | } |
| 2178 | } else if (shouldAutoScrollRef.current && !isNearBottom) { | 2178 | } else if (shouldAutoScrollRef.current && !isNearBottom) { |