Alex Styl
04/08/2025, 4:15 AMModifier.verticalScroll()
consume clicks normally?
Box {
Box(Modifier.fillMaxSize().clickable { warnln { "Click!" } }) // <- never gets clicked
Box(Modifier.fillMaxSize().verticalScroll(rememberScrollState()))
}
Alex Styl
04/08/2025, 4:19 AMNitesh Singh
04/08/2025, 8:53 AMKonstantin Klassen
04/08/2025, 9:15 AMAshu
04/08/2025, 9:25 AMfillMaxSize()
. Since they stack, the scrollable Box is on top, preventing clicks from reaching the clickable Box. i think !!Louis Pullen-Freilich [G]
04/08/2025, 1:28 PMAlex Styl
04/08/2025, 3:04 PMit’s not about the specific modifier’s behaviorI'm confused. If that's not the case why does this gets clicked?
Box {
Box(Modifier.fillMaxSize().clickable { warnln { "Click!" } }) // <- gets clicked
Box(Modifier.fillMaxSize())
}
Louis Pullen-Freilich [G]
04/08/2025, 3:06 PMLouis Pullen-Freilich [G]
04/08/2025, 3:06 PMAlex Styl
04/08/2025, 3:28 PMpointerInput()
and as a result it doesnt share the event with the siblings?Louis Pullen-Freilich [G]
04/08/2025, 3:35 PMBox {
Box(Modifier.pointerInput())
Box(Modifier.pointerInput())
}
By default, only one of these can receive any eventsAlex Styl
04/08/2025, 3:46 PMModifier.pointerInput(Unit) {
awaitPointerEventScope {
while (true) {
val event = awaitPointerEvent(
pass = PointerEventPass.Main
)
event.changes.forEach { it.consume() }
}
}
}
If just setting the pointerInput() consumes the event, why is there a way to consume changes? is that a different thing?Louis Pullen-Freilich [G]
04/08/2025, 3:47 PMLouis Pullen-Freilich [G]
04/08/2025, 3:48 PMAlex Styl
04/08/2025, 3:49 PMKonstantin Klassen
04/08/2025, 4:00 PM