I noticed that if I started a click and then i mou...
# compose
a
I noticed that if I started a click and then i mouse over a composable with either
hoverable()
or
.onPointerEvent(PointerEventType.Enter/Exit)
the event is never triggered. Is this a bug or intended? How can i get hovered events for where the pointer is in such case?
Copy code
val interactionSource = remember { MutableInteractionSource() }
    val hovered by interactionSource.collectIsHoveredAsState()

    Row(Modifier.fillMaxSize()) {
        Box(Modifier.weight(1f).fillMaxHeight())
        Box(
            modifier = Modifier.weight(1f).fillMaxHeight().background(Color.LightGray).hoverable(interactionSource),
            contentAlignment = Alignment.Center
        ) {
            Text("Hovered? = ${hovered}")
        }
    }
m
Try using pointer input Modifier instead
It looks like the same issue is happening with using pointerInput
👍 1
a
yup. mentioned in the OP
interesting. wasn't aware that the typical way of events being handled