Change theme
Help
Press space for more information.
Show links for this issue (Shortcut: i, l)
Copy issue ID
Previous Issue (Shortcut: k)
Next Issue (Shortcut: j)
Sign in to use full features.
Vote: I am impacted
Notification menu
Refresh (Shortcut: Shift+r)
Go home (Shortcut: u)
Pending code changes (auto-populated)
View issue level access limits(Press Alt + Right arrow for more information)
Unintended behavior
View staffing
Description
#1Jetpack Compose version: 1.5.9 Jetpack Compose component used: BottomModalSheet Android Studio Build: Hedgehog 2023.1.1 Patch 2 Kotlin version: 1.9.22
Steps to Reproduce or Code Sample to Reproduce:
We have a
ModalBottomSheet
with a stickyTextField
on the bottom. We allow bothPartiallyExpanded
andExpanded
states. Whenever we are in theExpanded
state and focus on theTextField
, the resulting screen resize from the keyboard showing causes theModalBottomSheet
to switch its target state toPartiallyExpanded
.This is a pretty jarring UI experience and ideally we would just stay in the
Expanded
state.I've traced it down to these lines in
ModalBottomSheet.android.kt
that prioritizePartiallyExpanded
whenever the anchors change (via the screen size changing).Here is a sample project and video is included: