diff options
| author | Adam <[email protected]> | 2026-03-03 06:20:48 -0600 |
|---|---|---|
| committer | Adam <[email protected]> | 2026-03-03 06:20:48 -0600 |
| commit | 7305fc044d3be663147c1461a353956659704a90 (patch) | |
| tree | d0758a8c43eca600cd4f635e7a31ca079ead9d0a /packages/ui/src/hooks | |
| parent | 1e2da601623efc33759b7f65922cbe801fc85465 (diff) | |
| download | opencode-7305fc044d3be663147c1461a353956659704a90.tar.gz opencode-7305fc044d3be663147c1461a353956659704a90.zip | |
chore: cleanup
Diffstat (limited to 'packages/ui/src/hooks')
| -rw-r--r-- | packages/ui/src/hooks/create-auto-scroll.tsx | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/packages/ui/src/hooks/create-auto-scroll.tsx b/packages/ui/src/hooks/create-auto-scroll.tsx index d67b1f31f..26e7e1404 100644 --- a/packages/ui/src/hooks/create-auto-scroll.tsx +++ b/packages/ui/src/hooks/create-auto-scroll.tsx @@ -85,7 +85,10 @@ export function createAutoScroll(options: AutoScrollOptions) { if (force && store.userScrolled) setStore("userScrolled", false) const distance = distanceFromBottom(el) - if (distance < 2) return + if (distance < 2) { + markAuto(el) + return + } // For auto-following content we prefer immediate updates to avoid // visible "catch up" animations while content is still settling. |
