Skip to content

[Bug]: keyboardBehavior="interactive" causes the bottom sheet to expand further than maxDynamicContentSize #2255

Open
@souyahia

Description

@souyahia

Version

v5

Reanimated Version

v3

Gesture Handler Version

v2

Platforms

iOS

What happened?

When a bottom sheet has dynamic sizing and keyboard behavior set to interactive, if the bottom sheet is already fully expanded, when opening the keyboard, the bottom sheet will expand further than the maxDynamicContentSize should allow to. Also, this causes to have the onAnimate event fired with a toIndex value equal to -1, even though the bottom sheet is still open, just not at a known snapIndex. This is annoying because in our app, a lot of our logic is based upon the fact that index === -1 = the bottom sheet is closed.

Reproduction steps

Define a BottomSheetModal with :

  • a BottomSheetTextInput
  • enableDynamicSizing={true}
  • maxDynamicContentSize set to a certain value
  • keyboardBehavior set to interactive (default value)

Reproduction sample

https://snack.expo.dev/@souyahia-mistral/bottom-sheet---issue-reproduction-template

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