[Bug]: Fast pan-down on Safari Web reaches the closed position without firing onDismiss
Version
v5
Reanimated Version
v3
Gesture Handler Version
v2
Platforms
Web
What happened?
On Safari Web, quickly swiping down a BottomSheetModal can move the sheet completely off-screen without completing the modal dismissal lifecycle.
After the failed gesture:
- The sheet is no longer visible.
onAnimateis not called withtoIndex: -1.onChangeis not called withindex: -1.onDismissis not called.- Application state remains open, so UI that should reopen the modal is not rendered.
- Calling
present()again may not work because the modal is still considered mounted.
A slow downward swipe works correctly. The issue is reproducible with a sufficiently fast downward swipe in Safari Web, but I could not reproduce it in Chrome.
This appears related to the sheet reaching closedDetentPosition during the gesture update, before the gesture end handler runs.
Environment:
@gorhom/bottom-sheet: 5.2.14react-native-reanimated: 4.3.1react-native-gesture-handler: 3.0.0react-native: 0.85.3- Expo: 56.0.8
- Browser/device: Safari on iPhone 16e running iOS 26.2.1
- Platform: Safari Web
The issue form does not currently provide Reanimated v4 or Gesture Handler v3 options, so I selected the nearest available options in those dropdowns and documented the exact versions above.
The Expo Snack service currently offers SDK 55 rather than SDK 56. The reproduction sample therefore uses the SDK 55 recommended versions (react-native-gesture-handler 2.30.0, react-native-reanimated 4.2.1, and react-native-worklets 0.7.4), while the original application environment and exact dependency versions are documented above.
A very similar report exists in #2264, but it was automatically closed because it did not follow the issue template.
Reproduction steps
- Open the reproduction in Safari.
- Press "Present modal".
- Slowly swipe the modal down.
- Confirm that
onChange(-1)andonDismissare logged. - Present the modal again.
- Swipe the handle down very quickly, far enough for it to reach the bottom of the viewport during the gesture.
- Observe that the modal visually disappears.
- Observe that no closing
onAnimate,onChange(-1), oronDismissevent is logged. - Press "Present modal" again and observe that the modal may remain stuck because it was never unmounted.
The issue does not reproduce reliably in Chrome. It reproduces in Safari Web when the downward gesture is sufficiently fast.
Reproduction sample
https://snack.expo.dev/@okitan/gorhom-bottom-sheet_bug_report?platform=web
Relevant log output
Normal downward swipe:
onAnimate: -1 -> 0
onChange: 0
onAnimate: 0 -> -1
onChange: -1
onDismiss
Failed fast downward swipe:
onAnimate: -1 -> 0
onChange: 0
[gesture ends after reaching the closed position]
[no onAnimate to -1]
[no onChange -1]
[no onDismiss]Source: gorhom/react-native-bottom-sheet