I'm encountering a reproducible issue with a `Dial...
# compose
y
I'm encountering a reproducible issue with a
Dialog
in a Compose Multiplatform project. When the soft keyboard appears, the dialog UI becomes shaky, as if the focused field try to repeatedly repositioning itself. This happens consistently in Android, even with various
windowSoftInputMode
settings. I suspect the issue is related to
Dialog
as
windowSoftInputMode
does not apply to a dialog's separate window on Android. Code to reproduce in 🧵
Copy code
@Composable
fun CodeToReproduce() {
    var value by remember { mutableStateOf("") }
    Dialog(
        onDismissRequest = {},
        properties = DialogProperties(usePlatformDefaultWidth = false)
    ) {
        Column(
            modifier = Modifier
                .fillMaxSize(0.95f)
                .clip(MaterialTheme.shapes.large)
                .background(MaterialTheme.colorScheme.surface)
                .padding(8.dp)
                .verticalScroll(rememberScrollState())
                .imePadding()
        ) {
                TextField(value = "Text Field 1", onValueChange = {})
                TextField(value = "Text Field 2", onValueChange = {})
                repeat(20) {
                    Text(text = "Item $it", modifier = Modifier.padding(16.dp))
                }
                TextField(value = value, onValueChange = {value = it})
                TextField(value = "Text Field 4", onValueChange = {})
        }
    }
}
using latest compose version 1.9.0
after further investigation, it seem like a device issue, the device that is the issue is happening is android 11, model Infinix X662
z
It doesn’t happen on other devices?
Either way, please file a bug on the Google issue tracker
👍 1