From 70c6fcfbbfd8d87d46f1a6b2d5d32e522ad8ba54 Mon Sep 17 00:00:00 2001
From: Adam <2363879+adamdotdevin@users.noreply.github.com>
Date: Tue, 3 Mar 2026 10:25:43 -0600
Subject: chore: cleanup

---
 packages/ui/src/hooks/create-auto-scroll.tsx | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

(limited to 'packages/ui/src/hooks/create-auto-scroll.tsx')

diff --git a/packages/ui/src/hooks/create-auto-scroll.tsx b/packages/ui/src/hooks/create-auto-scroll.tsx
index 26e7e1404..3dc520c62 100644
--- a/packages/ui/src/hooks/create-auto-scroll.tsx
+++ b/packages/ui/src/hooks/create-auto-scroll.tsx
@@ -78,11 +78,13 @@ export function createAutoScroll(options: AutoScrollOptions) {
 
   const scrollToBottom = (force: boolean) => {
     if (!force && !active()) return
+
+    if (force && store.userScrolled) setStore("userScrolled", false)
+
     const el = scroll
     if (!el) return
 
     if (!force && store.userScrolled) return
-    if (force && store.userScrolled) setStore("userScrolled", false)
 
     const distance = distanceFromBottom(el)
     if (distance < 2) {
-- 
cgit v1.2.3

