summaryrefslogtreecommitdiffhomepage
path: root/packages/ui/src/hooks
diff options
context:
space:
mode:
authorAdam <[email protected]>2026-03-02 18:23:59 -0600
committerAdam <[email protected]>2026-03-03 05:35:15 -0600
commit5e8742f4312a8923f3da92172a7247470ef34516 (patch)
tree8b9a664275be2d0b009359677f7826d1c486e38a /packages/ui/src/hooks
parent18850c4f911aaeb73846220e1139c1d07113b306 (diff)
downloadopencode-5e8742f4312a8923f3da92172a7247470ef34516.tar.gz
opencode-5e8742f4312a8923f3da92172a7247470ef34516.zip
fix(app): timeline jank
Diffstat (limited to 'packages/ui/src/hooks')
-rw-r--r--packages/ui/src/hooks/create-auto-scroll.tsx5
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 c32017739..8483915a8 100644
--- a/packages/ui/src/hooks/create-auto-scroll.tsx
+++ b/packages/ui/src/hooks/create-auto-scroll.tsx
@@ -142,7 +142,10 @@ export function createAutoScroll(options: AutoScrollOptions) {
const handleInteraction = () => {
if (!active()) return
- stop()
+ const selection = window.getSelection()
+ if (selection && selection.toString().length > 0) {
+ stop()
+ }
}
const updateOverflowAnchor = (el: HTMLElement) => {