Open Emt-tz opened 8 months ago
Simplified a reproducer (https://github.com/eymar/repr_ios_subcompose_layout_click):
@Composable
internal fun App() = MaterialTheme {
Column {
Spacer(modifier = Modifier.height(200.dp))
val interactionSource = remember { MutableInteractionSource() }
LaunchedEffect(interactionSource) {
interactionSource.interactions
.collect { println("Interaction = $it") }
}
OutlinedTextField(
value = "Try click me",
onValueChange = {},
interactionSource = interactionSource,
readOnly = true,
singleLine = true,
modifier = Modifier.fillMaxWidth()
)
}
}
On iOS and desktop it never prints androidx.compose.foundation.interaction.PressInteraction$Press
, only androidx.compose.foundation.interaction.FocusInteraction$Focus
.
But on android it prints both.
It means the issue is not with subcompose layout, but with OutlinedTextField
.
You can try to change your code to not rely on PressInteraction.Press
to workaround the issue for now.
Note for our team: For the reproducer in mpp:demo
have a look at https://github.com/JetBrains/compose-multiplatform-core/commit/3e390ddf9893f1360f85936f553b512ab34384f3#diff-d39ddc7e61fa5922223e673e2c9a3a82682d808f3394404b7250d302b3a25327R28
Thank you Sir.
Any updates on this issue?
Please check the following ticket on YouTrack for follow-ups to this issue. GitHub issues will be closed in the coming weeks.
I am building an expense app in compose multiplatform (1.5.0) but I have an issue with this
In Android, it's working fine but on iOS it does not work on clicking. But also I have trouble hiding the keyboard as items appear to be hidden under the keyboard in Android the manifest file I can adjust resize to that when the keyboard appears then it pushes content upwards.
Here is my list
and here is the list