summaryrefslogtreecommitdiffhomepage
path: root/packages/ui/src/hooks
diff options
context:
space:
mode:
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) => {