Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(bottomsheet): fix window collapse resulting in an update in the a… #1435

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jspizziri
Copy link

…nimatedIndex of the bottomsheet

fix #1416

Motivation

As documented in the above issue a window collapse will cause the bottomsheet to recalculate its animatedIndex in certain scenarios. If the window is decreasing in size the user doesn't expect a change or closure of the bottom sheet index.

This behavior can be observed in the following scenarios:

  1. Have a bottom sheet position sufficiently close to the bottom of the screen (lets say 100px).
  2. On web, with the sheet open to the smallest index, minimize or resize the browser window (this must be a quick action and a sufficient size differential).
  3. On native Android with android:windowSoftInputMode="adjustResize" and the sheet open to the smallest index, trigger the keyboard from an input that is NOT inside the sheet, but is outside of it (e.g. a search text box).

@jspizziri
Copy link
Author

@gorhom would love your feedback on this one. It doesn't feel super elegant, but it does seem to be getting the job done for me. I imagine someone with more knowledge of the lib might be able to identify something more elegant.

@gorhom gorhom force-pushed the master branch 5 times, most recently from 76801d5 to c941c83 Compare October 13, 2024 15:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants