Close dialog by tapping outside

I’d like to know how I can make a dialog created by:

juce::DialogWindow::LaunchOptions dialog;
dialog.content.setOwned();
etc.
dialog.launchAsync();

such that it will close/cancel when the user taps outside the dialog area (on iOS/Android)?
Basically, just like how PopupMenu::showMenuAsync() behaves.

1 Like