OSX beep in FileChooser::launchAsync

Hi!

I am getting an unwanted beep, when closing the OSX native file browser.

I have a FileChooser, which I launch async, using the FileChooser::launchAsync function. (I use the OSX native file chooser dialog).
The file choose itself is working fine.

BUT: If I close the file chooser, I get a short warning beep. Its the typical OSX beep, which plays, if you are trying to do an input, which is not allowed. It does close. However, it also beeps (kind of annoying).

I debugged it, and its coming from here: Component::inputAttemptWhenModal(). So it seems, that for some reason I am unwillingly doing an input in modal state.

The thing is: I think this must be a bug? Because this beep happens, even when I click the “Cancel” button on the file chooser. Which should be an allowed operation, I think.

I am using JUCE 5.4.5 on OSX 10.14.6