Skip to content

fix: Dialog - prevent open animation interruption by residual touch on Android - #4038

Open
Yoavpagir wants to merge 4 commits into
masterfrom
fix/dialog-android-open-spring-pan-interrupt
Open

fix: Dialog - prevent open animation interruption by residual touch on Android#4038
Yoavpagir wants to merge 4 commits into
masterfrom
fix/dialog-android-open-spring-pan-interrupt

Conversation

@Yoavpagir

Copy link
Copy Markdown

Description

On Android, a bottom-direction Dialog (and therefore ActionSheet, which builds on it) can open only part-way — resting below its final position with just the header visible — when it is opened as a direct result of a gesture-driven trigger (e.g. List.Item, whose TapGestureHandler fires onPress on gesture END while the touch is still settling). A plain touchable trigger (e.g. Button) lifts cleanly before the modal mounts and is unaffected.

Root cause: the Dialog's own panGesture has no activation threshold, so on Android the residual touch stream from the triggering gesture leaks into the freshly-mounted pan and drives visibility mid-open, interrupting the withSpring(1) open animation. Because the translation is interpolate(visibility, [0,1], [hiddenLocation, 0], CLAMP), an interrupted visibility (< 1) leaves the card translated part-way down. Dismiss is unaffected (the residual touch is long gone by then), which is why the close animation always plays from the full height.

Fix: add .minDistance(10) to the Dialog panGesture so it only engages on a deliberate drag. A residual, near-static touch can no longer activate the pan and overwrite visibility, while drag-to-dismiss (movement well beyond the threshold) keeps working unchanged.

Changelog

Dialog/ActionSheet: fixed the bottom sheet occasionally opening part-way on Android when triggered from a gesture-based component (e.g. List.Item); the open animation is no longer interrupted by the triggering touch.

Additional info

Under investigation for MOBAPP-2994 (Wix OneApp — "Mute Notifications" ActionSheet opening partially on Android). Draft while verifying on-device via the standard snapshot → wrapper → app build flow.

…n Android (minDistance)

A bottom Dialog/ActionSheet opened from a gesture-driven trigger (e.g. List.Item's
TapGestureHandler firing onPress on END) can rest part-way open on Android: the residual
touch leaks into the Dialog's own panGesture and drives `visibility` mid-open, interrupting
the open spring. Adding a minDistance activation threshold to the pan prevents a near-static
residual touch from engaging it, while drag-to-dismiss keeps working.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

✅ PR Description Validation Passed

All required sections are properly filled out:

  • Description
  • Changelog
  • Additional info

Your PR is good for review! 🚀


This validation ensures all sections from the PR template are properly filled.

@Yoavpagir
Yoavpagir marked this pull request as ready for review August 2, 2026 07:58
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