fix(terminal): require touch slop before starting finger scroll - #255
Merged
Conversation
itsvks19
approved these changes
Aug 31, 2026
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.
Problem
Modifier.scrollstarted scrolling on the first drag event with no touch-slop gate. Effects:dragEvent.consume()ran on every move event (even sub-pixel drift from a still finger). Compose's tap detector cancels long-press when movement is consumed by another gesture, so long-press to select text was unreliable — any drift during the hold canceled it.Additionally,
previousPositionwas never updated whileselectionState.isActive; if selection deactivated mid-gesture, the first scroll frame used a stale position and jumped a large delta.Fix
passedTouchSlop(viewConfiguration.touchSlop), matching the standard drag-gesture arbitration used bydetectDragGestures.previousPositionin sync duringselectionState.isActive, so a selection drag that becomes a scroll starts with a fresh delta (no jump).Verification
Finger scrolling, long-press selection, and selection-handle drags tested on-device via a signed release build from the fork's CI.