To handle file uploads on a website we have to use a hidden <input type="file" /> element.
To find out what file has been selected in the Select File Dialog, we can use the onchangeevent.
But how can we detect if the user has hit the cancel button?
Unfortunately, there is no oncancel event.
There exist a lot of workarounds to detect if the user has hit the cancel button, but due to the problem I described here, none of them worked for me reliably.