I have a full-screen scrollable overlay and I'm trying to prevent touch input from accidentally going into the background content when the overlay is visible. I tried to do this by applying a modifier to the overlay parent container, but this seems to interfere with the scrollability of the overlay inner content. There probably is a better approach, but I'm not sure what it would be 🤔 Or am I using
so that you only consume events that are not consumed by any child.
Albert Chang
04/27/2023, 6:26 AM
Also I think
Surface
already does this so you can probably just use a
Surface
as the container.
v
vide
04/27/2023, 6:36 AM
Oh, thanks! I will try Final next. I apparently misunderstood the differences between the event passes
vide
04/27/2023, 7:25 AM
Final
didn't work either blob thinking upside down It still breaks the children's scrolling.
vide
04/27/2023, 7:26 AM
I took a look at the
Surface
implementation. Turns out it is just an empty block:
Copy code
.pointerInput(Unit) {}
This works for my use case. Thanks for the suggestion of taking a look at Surface!
vide
04/27/2023, 7:30 AM
Do you know if there is some resource or documentation explaining low level pointerInput scope handling in detail? It seems quite confusing and I'd like to get to know it better