I’m trying to use `Popup` , but after adding it to...
# compose-desktop
o
I’m trying to use
Popup
, but after adding it to composition hierarchy
onDismissRequest
never gets called and mouse never registers clicks anywhere else (but the application is running and UI keeps updating).
message has been deleted
Either debugger is lying to me or it calls wrong lambda – this is a call from the frame above after I set
isFocusable
true
But DropdownMenu works as expected…
i
Reproducer would help to figure out what is happenning )
o
Huh, that’s already quite a big program, hard to find what’s essential… But I’ll try
So, after clicking on a “Wow!” box popup displays, but never dismisses
i
Just set isFocusable:
Copy code
Popup(isFocusable = true, onDismissRequest = { popupState = false }) {
    Text("Popup", modifier = Modifier.size(120.dp).background(Color.Blue))
}
On your screenshot
isFocusable=true
though 🤔
o
Indeed, with isfocusable it works here, but not in my real program. But again, in real program it is inside lazy grid
Right, here it doesn’t work
i
o
As I said, debugger shows that another lambda is called, the one that is in
clickable
Maybe indeed runtime fails to distinguish these two lambdas