This piece of code works for Android and Desktop: ...
# compose-web
g
This piece of code works for Android and Desktop:
Copy code
Box(
    modifier = Modifier
        .pointerInput(Unit) {
            detectDragGestures(
                onDragStart = {
                    println("onDragStart")
                },
                onDragEnd = {
                    println("onDragEnd")
                },
                onDrag = { change, amount ->
                    println("onDrag")
                },
            )
        }
) { }
But for
wasmJs
I get no response. I’m not interested in which mouse button is being used, I just need to get notified for those 3 methods. Do I need to use other approach for web? I’ve tried this and it works (I get DRAG DOWN and UP) but is it the right approach?