Skip to content

[Bug]: Strange disappearance animation when changing content of dynamic bottom sheet #2169

Open
@yolpsoftware

Description

@yolpsoftware

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.

Image

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 the BottomSheetView
  • 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

Reproduction sample

https://snack.expo.dev/@yolpsoftware/reproduction-for-strange-bottom-sheet-disappearance-animation

Relevant log output

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions