JetBrains / compose-multiplatform

Compose Multiplatform, a modern UI framework for Kotlin that makes building performant and beautiful user interfaces easy and enjoyable.
https://jetbrains.com/lp/compose-multiplatform
Apache License 2.0
16.35k stars 1.18k forks source link

Empty Material 3 TextField with label jumps when it gets focus #4570

Closed GazimSoliev closed 2 months ago

GazimSoliev commented 8 months ago

Describe the bug Empty Material 3 TextField with label jumps when it gets focus Affected platforms

Versions

To Reproduce Steps and/or the code snippet to reproduce the behavior:

Box(
    modifier = Modifier.fillMaxSize(),
    contentAlignment = Alignment.Center
) {
    Column(
        verticalArrangement = Arrangement.spacedBy(8.dp),
        horizontalAlignment = Alignment.CenterHorizontally
    ) {
        Text("Hello")
        TextField(TextFieldValue(), {}, label = { Text("Label 1") })
        TextField(TextFieldValue(), {}, label = { Text("Label 2") })
    }
}

Expected behavior It doesn't jump when it gets focus

Video

https://github.com/JetBrains/compose-multiplatform/assets/63443274/8cdd3a82-ede1-4a40-b664-4882a65ba736

okushnikov commented 3 months ago

Please check the following ticket on YouTrack for follow-ups to this issue. GitHub issues will be closed in the coming weeks.

Feinate commented 2 months ago

Same here. I don't know why.