i was not discouraged when I learned that scrollin...
# compose-web
a
i was not discouraged when I learned that scrolling within canvas is not supported yet. So i took it upon myself to fix it (hackily): 1. define a global channel
val scrollListener = Channel<Double>()
2. Consume it in your scrollable composable:
Copy code
val scrollState = rememberLazyListState() 
  LaunchedEffect(Unit) {
        scrollListener.consumeAsFlow()
            .collect {
                scrollState.scrollBy(it.toFloat())
            }
    }
3. attach it to a window event:
Copy code
fun main() {
    window.addEventListener("wheel", { event ->
        if (event is WheelEvent) {
            event.stopPropagation()
            GlobalScope.launch {
                scrollListener.trySend(event.deltaY)
            }
        }
    })
}
then you have scrolling support