FileReference doesn't send CANCEL event in HTML5

I have these lines:

    fileRef = new FileReference();
    fileRef.addEventListener(Event.SELECT, selectFileEvent);
    fileRef.addEventListener(Event.CANCEL, selectFileEvent);
    var typeFilter:FileFilter = new FileFilter(promptStr, extensions);
    fileRef.browse([typeFilter]);

With the onscreen file browser that appears, the SELECT event is triggered when the user selects a file but the CANCEL event is not triggered by the user cancelling. Tried listening for CHANGE, CLEAR and CLOSE but those failed also. Used hasEventListener to verify CANCEL assignment.

Tried Safari, Firefox and Chrome for macOS 10.14.6. Any ideas how to capture user cancelling from file dialog?

Thanks in advance!

Really need to solve this problem ASAP.