Description
Version
v5
Reanimated Version
v3
Gesture Handler Version
v2
Platforms
iOS
What happened?
There is a strange case of the bottom-sheet suddenly animating back to the bottom without any explicit trigger for it.
As you can see, the bottom sheet animates to the bottom, just because the size of the contents have changed (sometimes the top border keeps where it is, but the bottom border is animated to the top until the bottom sheet is no longer visible).
What triggers this behavior seems to be the following combination:
- enableDynamicSizing={true}
- a positive
marginTop
on theBottomSheetView
- a change in the contents of the bottom sheet
Note: the provided Snack does not run for some reason that I don't understand but have already reported. Just paste the whole App.tsx into a local project and run it from there.
Note that the problem disappears if you remove the marginTop
on line 25.
Reproduction steps
- Take the code from the reproduction example here: https://snack.expo.dev/@yolpsoftware/reproduction-for-strange-bottom-sheet-disappearance-animation
- If you cannot run the Snack, paste the code (just one file, App.tsx) into a local project and run it from there
Reproduction sample
https://snack.expo.dev/@yolpsoftware/reproduction-for-strange-bottom-sheet-disappearance-animation