CallOutBox toggling broken on osx/ios (with workaround)

i’ve noticed broken behavior in CallOutBox in my app and i can reproduce it in the demo using the colour picker, see the video below:

https://monosnap.com/file/9wEJpPxQwVEafHw0KYdnPlf9RSSH6x

the initial click opens the CallOutBox, but the next click behaves differently depending on a number of cases:

  1. if i click on the button that toggled it initially, the CallOutBox disappears on the mouseDown but reappears on the mouseUp, and then sometimes disappears again.
  2. sometimes if i toggle the CallOutBox fast enough it seems to invert its behavior, and clicking outside of the toggle will actually enable the CallOutBox. i can’t make it disappear until i click on the initial toggle button, and even then it’s not always 100% that i can “fix” it.
  3. if i click anywhere else, the CallOutBox disappears correctly.

this behavior occurs on both osx and ios, any ideas?

i think i figured out what’s going on - if you call CallOutBox::launchAsynchronously from a clicked or onClick (like the demo runner does for the ColourSelector then this behavior exists. if you instead call CallOutBox::launchAsynchronously from mouseDown then it works correctly.

i don’t think this is the intended behavior (at least, i wouldn’t expect the demo code to be broken) but at least there’s a workaround?

1 Like