onClick/clickable functionality breaks when using HtmlText
DFreds opened this issue · 3 comments
DFreds commented
If a parent composable is listening for clicks, the HtmlText stops the clicks from occurring. Here is an example:
Column {
Card(
modifier = Modifier.clickable {
println("Clicked the html card!") // never triggers
}
) {
HtmlText(text = "Some <b>bolded and cool</b> text that should click")
}
Button(
onClick = {
println("Clicked the html button!") // never triggers
}
) {
HtmlText(text = "Some <b>bolded and cool</b> button")
}
Card(
modifier = Modifier.clickable {
println("Clicked the non-html card!") // always triggers
}
) {
Text(text = "Some <b>bolded and cool</b> text that should click")
}
Button(
onClick = {
println("Clicked the non-html button!") // always triggers
}
) {
Text(text = "Some <b>bolded and cool</b> button")
}
}
DFreds commented
Any updates or potential fixes for this?
ch4rl3x commented
The problem is that HtmlText itself adds a click listener
ch4rl3x commented
Fixed with version 1.3.1