Hey, I'm seeing a bug when clicking on TextFields ...
# compose
a
Hey, I'm seeing a bug when clicking on TextFields in Android. After the first tap, if i dismiss the keyboard and then tap again, the keyboard doesn't come back up. The kicker is that this is a compose multiplatform bug that I'm only seeing on Android. The compose multiplatform GH issue tracker says I should file with Google but I'm not so sure I should do that:
d
Report it to Google, Compose Multiplatform should be the same as Compose Android in that case Ideally create a min repro with Compose Android.
n
@Andrew Watson which version are you using ?
a
Compose 1.5.4, Compose plugin 1.5.11
n
After dismissing the keyboard, Did you tap again into the field or just moving the cursor back&forth
a
A little hard to tell from the video, but I was tapping on it
👍 1
n
Tested on the Compose on Android and its reproducible so its not just multiplatform
a
WAT wow, okay
Can you share a video of what you're seeing? I'm actually quite surprised
n
I am using material
so let me try the foundation
a
Not material 3?
n
Yes Material3
a
Oh interesting, cuz I'm using older material too
I guess, maybe it's not considered a bug then? Maybe app developers just manually have to open the keyboard in such cases?
🫥 1
n
Copy code
1.2.0-alpha12
Material 3 this version I am using
Compose-TextField.mp4
a
Interesting
n
even its reproducible in foundation too
a
Well then. I guess I might just have to with what I've got
d
Can one of you share a minimal code example that reproduces this?
n
Copy code
@Composable
fun SelectableRowDemo(itemLabel: String) {
    var string by remember {
        mutableStateOf("Hello")
    }
    Row(
        modifier = Modifier
            .fillMaxWidth()
            .padding(Dimens.paddingMedium),
    ) {
      //  androidx.compose.material3.TextField(value = string , onValueChange = {string = it} )
        BasicTextField(value = string, onValueChange = {string = it})
    }
}
a
Yeah here's mine:
Copy code
import androidx.compose.material.TextField
@Composable
fun AnyComposable() {
    MaterialTheme {
        Column(
            modifier = Modifier
                .fillMaxSize(),
            horizontalAlignment = Alignment.CenterHorizontally
        ) {
            val inputVal = remember { mutableStateOf("") }
            TextField(
                modifier = Modifier
                    .fillMaxWidth()
                    .padding(
                        all = 16.dp
                    ),
                value = inputVal.value,
                onValueChange = {
                    inputVal.value = it
                }
            )
        }
    }
}
n
Fix for this is coming in next beta release https://issuetracker.google.com/issues/311437241
☝🏻 1
a
Amazing! Thanks for the fast response.