Skip to content

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

Closed
Yoavpagir wants to merge 1 commit into
wix:masterfrom
Yoavpagir:fix/dialog-android-open-spring-pan-interrupt
Closed

fix: Dialog - prevent open animation interruption by residual touch on Android#4037
Yoavpagir wants to merge 1 commit into
wix:masterfrom
Yoavpagir: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>
@alexandergolbergwix
alexandergolbergwix marked this pull request as ready for review July 29, 2026 12:58
@Yoavpagir Yoavpagir closed this Jul 29, 2026
@Yoavpagir
Yoavpagir deleted the fix/dialog-android-open-spring-pan-interrupt branch July 29, 2026 13:40
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.

2 participants