google / accompanist

A collection of extension libraries for Jetpack Compose
https://google.github.io/accompanist
Apache License 2.0
7.43k stars 598 forks source link

[Navigation Material] ModalBottomSheet won't open when windowSoftInputMode is set to adjustResize #1497

Closed jibe-n closed 1 year ago

jibe-n commented 1 year ago

Describe the bug

I noticed a bug after upgrading my project to Navigation Material 0.29.0-alpha.

When windowSoftInputMode is set to adjustResize in the manifest and you navigate from a bottom sheet to a destination that uses the keyboard, you won't be able to open any bottom sheet after you navigate back.

I made a sample to reproduce this bug, available here.

To Reproduce

Using the sample above, follow this steps to reproduce the behavior:

  1. Click on the Open Sheet button
  2. From the bottom sheet, click on the Navigate to Screen B button
  3. Navigate back
  4. Click on the Open Sheet button again, the bottom sheet cannot be opened anymore

Expected behavior

The bottom sheet should be able to be opened again.

Environment:

Additional context

Removing android:windowSoftInputMode="adjustResize" in the manifest solves the issue.