Skip to content

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 added the v5 label Jul 15, 2023
@gorhom gorhom self-assigned this Jul 15, 2023
@gorhom gorhom self-requested a review July 15, 2023 09:45
@gorhom gorhom force-pushed the master branch 2 times, most recently from 13c3769 to 59ab3c6 Compare August 31, 2024 17:17
@gorhom gorhom force-pushed the master branch 13 times, most recently from d3dda23 to cb750f6 Compare September 22, 2024 13:09
@gorhom gorhom force-pushed the master branch 8 times, most recently from 4d1b0d4 to 5907619 Compare October 13, 2024 15:35
@gorhom gorhom force-pushed the master branch 5 times, most recently from 76801d5 to c941c83 Compare October 13, 2024 15:51
@gorhom gorhom force-pushed the master branch 2 times, most recently from 425b6ec to a123b17 Compare August 17, 2025 21:39
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