Skip to content

fix: stop mobile selection handles from collapsing selection on tap#1200

Merged
LucasXu0 merged 2 commits into
flutter/3_27_4from
chore/optimize-mobile-gesture
May 8, 2026
Merged

fix: stop mobile selection handles from collapsing selection on tap#1200
LucasXu0 merged 2 commits into
flutter/3_27_4from
chore/optimize-mobile-gesture

Conversation

@LucasXu0

@LucasXu0 LucasXu0 commented May 6, 2026

Copy link
Copy Markdown
Collaborator

Wrap the left/right drag handle in a dedicated _SelectionDragHandle that fills the outer touch rect with its own RawGestureDetector, owns the pan recognizer, and registers a no-op tap recognizer so it wins the gesture arena over the editor's tap recognizer below. This stops a finger lift on the handle from collapsing the selection back to a caret.

Also expand the handle's hit area to the platform minimum touch target (44pt iOS / 48dp Android), anchoring growth away from the visible ball so the ball position is unchanged.

LucasXu0 added 2 commits May 6, 2026 11:34
Wrap the left/right drag handle in a dedicated _SelectionDragHandle that
fills the outer touch rect with its own RawGestureDetector, owns the pan
recognizer, and registers a no-op tap recognizer so it wins the gesture
arena over the editor's tap recognizer below. This stops a finger lift
on the handle from collapsing the selection back to a caret.

Also expand the handle's hit area to the platform minimum touch target
(44pt iOS / 48dp Android), anchoring growth away from the visible ball
so the ball position is unchanged.
@LucasXu0 LucasXu0 merged commit a4fa594 into flutter/3_27_4 May 8, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant