Hello! I have Surface with clickable handler a Tex...
# compose-desktop
p
Hello! I have Surface with clickable handler a Text on it. In build-184 when i click on Text, click event propagated to surfsce click handler. In build-211 it is not propagated. What should i do, to keep previous logic?
a
@matvei
m
Most probably you are hitting the behaviour change, where
Surface(Modifier.clickable)
doesn't work anymore. This is because we've this version of Surface to consume all clicks behind it (and the Modifier.clickable you set is technically a "behind" case) You can use new Surface overload with onClick parameter to handle clicks properly
p
Thanks!
r
You can use new Surface overload with onClick parameter to handle clicks properly
@matvei which overload is this referring to? I can only find the single
Surface
function which doesnt have an
onClick
parametert
m
There's a new overload with onClick parameter available starting beta08, it should be available in rc01 as well. https://cs.android.com/androidx/platform/tools/dokka-devsite-plugin/+/master:testDat[…]ource/androidx/compose/material/Surface.kt;l=199?q=Surface.kt