You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When a TextField inside LazyColumn with Modifier.imePadding receives focus and the keyboard is displayed, the column is placed incorrectly, sometimes leaving a gap between itself and the keyboard.
Affected platforms
iOS
Versions
Kotlin version*: 1.9.21
Compose Multiplatform version*: 1.5.11
To Reproduce
@Composable
fun IosApp() {
MaterialTheme {
LazyColumn(Modifier.imePadding().fillMaxSize().background(Color.Yellow)) {
items(10) {
ListItem()
}
}
}
}
@Composable
private fun ListItem() {
var text by remember { mutableStateOf("") }
TextField(
value = text,
onValueChange = { text = it },
modifier = Modifier.fillMaxWidth().padding(vertical = 40.dp, horizontal = 20.dp)
)
}
For anyone that runs into this, setting onFocusBehavior = OnFocusBehavior.DoNothing in the ComposeUIViewController fixed this for me. Found it in this merge.
For anyone that runs into this, setting onFocusBehavior = OnFocusBehavior.DoNothing in the ComposeUIViewController fixed this for me. Found it in this merge.
Thank you so much!!! I spent literally 2 days trying to understand whats going on.
Describe the bug
When a TextField inside
LazyColumn
withModifier.imePadding
receives focus and the keyboard is displayed, the column is placed incorrectly, sometimes leaving a gap between itself and the keyboard.Affected platforms
Versions
To Reproduce
Screenshots
Simulator.Screen.Recording.-.iPhone.15.Pro.-.2023-12-08.at.07.43.40.mp4
This has already been reported in #3621, but that reports several bugs in one ticket, and this has a more specific reproducer.
The text was updated successfully, but these errors were encountered: