Repository navigation
fix: anchor the mobile selection auto scroll on the pointer - #1251
Merged
Merged
Conversation
asjqkkkk
marked this pull request as draft
November 18, 2026 03:22
asjqkkkk
force-pushed
the
fix/mobile/scrolling
branch
3 times, most recently
from
November 18, 2026 06:46
dfde41f to
93f6b09
Compare
The auto scroll while dragging a selection handle used the selection rect as its anchor and a 220px band as the trigger region, and the scroll direction was hardcoded per handle type (left handle -> up, right handle -> down). This made the drag scrolling unreliable: - the selection rect is glued to the content, so it never reaches the edge of the viewport and the document stops scrolling as soon as the content moves - the trigger region was far too large (a ~110px margin), so the document started scrolling long before the pointer reached the edge - a handle could only scroll in one direction - the document kept scrolling after the user released the handle Now the auto scroll is driven by the mobile selection service: - the pointer is the anchor, so the document keeps scrolling while the pointer is held at the edge, even when it is not over any text - the proxy rect is a square centered on the pointer (80px, so the pointer only has to be within 40px of the edge), and the direction is derived from the position of the pointer, which lets both handles scroll up and down - the comfortable reading position scroll (220px margin) is still used for the selection changes that are not part of a drag - the auto scroll is stopped when the drag ends, and the drag mode is kept in the selection extra info so that the tail of a drag is not mistaken for a regular selection change Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
asjqkkkk
force-pushed
the
fix/mobile/scrolling
branch
from
November 18, 2026 10:16
93f6b09 to
51d7c46
Compare
asjqkkkk
marked this pull request as ready for review
November 19, 2026 05:45
image 4.11.0 calls ZLibDecoder.decodeLazy, which only exists in archive >=4.1.0, but pdf caps archive below 4.1.0. The resolved pair image 4.11.0 + archive 4.0.9 fails to compile. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
asjqkkkk
force-pushed
the
fix/mobile/scrolling
branch
from
November 26, 2026 07:14
dd007e2 to
98de631
Compare
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #1251 +/- ##
==========================================
+ Coverage 71.50% 71.99% +0.48%
==========================================
Files 334 334
Lines 16647 16674 +27
==========================================
+ Hits 11903 12004 +101
+ Misses 4744 4670 -74 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The auto scroll while dragging a selection handle used the selection rect as its anchor and a 220px band as the trigger region, and the scroll direction was hardcoded per handle type (left handle -> up, right handle -> down).
This made the drag scrolling unreliable:
Now the auto scroll is driven by the mobile selection service: