-
Notifications
You must be signed in to change notification settings - Fork 192
Description
In paginated (non-scroll) mode, when selecting text by long-pressing and dragging toward the screen edge, the page automatically turns while the selection is being extended. This makes selecting text across the full width of a page unreliable.
Expected behavior:
Page should remain fixed while actively selecting text. Page turns should only occur via deliberate swipe gestures when no selection is in progress.
Actual behavior:
WKWebView's internal auto-scroll-to-reveal feature triggers page turns during the selection drag.
Investigation notes:
• Setting scrollView.isScrollEnabled = false works for blocking page turns after selection exists, but not during the selection drag
• WKWebView's selection auto-scroll bypasses scroll view properties, gesture recognizers, and KVO on contentOffset
• The selectionchange JS event fires, but the scroll has already occurred by then
Environment:
• iOS 17+
• Paginated reading mode (non-scroll)
Edit: I took a stab at this myself but was unsuccessful. Wondering if there's any extra ideas out there.