iOS PopupMenus not returning

gui

#1

Hi All,

Having an issue where once I’ve called BluetoothMidiDevicePairingDialogue::open(), popup menus in my app stop returning a value on close. Pairing dialogue is working beautifully, the PopupMenus are working visually, just not returning anything…

This happens both for menus shown async and menus shown modally, i’m a bit stumped. Has anyone got any ideas?


#2

That’s pretty bizarre! Can you debug to catch the menus being clicked on and see where it goes?


#3

I can have a go! What’s the best way of catching MouseEvents at the top level?


#4

Oh, maybe stick some breakpoints inside the PopupMenu code, in the mouseDown callback, perhaps, and dig around in there.


#5

Of course, sorry.

It looks like the isCurrentlyBlockedByAnotherModalComponent() function in Component::internalMouseDown is returning true when it shouldn’t be, meaning the mouse event is not routed to the PopupMenu MouseSourceState object as normal.

Maybe just a flag not being reset?


#6

Yes, sounds likely. We’ll have a look…


#7

Great, thanks!


#8

Thanks for reporting @lukealpha. Turns out it had nothing to do with the bluetooth selector specifically, but with any component peer being dismissed by a mouse down event. The corresponding mouse-up event would get lost and JUCE would think that there is always still a mouse button down somewhere.

A fix for this will appear on develop shortly with commit 2021c64.


#9

Brilliant, cheers guys.