I have developed a plug-in for Illustrator CC2014. The plug-in displays modal dialog built with HTML5. And the modal dialog registers an eventListener of unload/beforeunload to detect that the dialog was closed.. But in the Mac, I could not get the unload/beforeunload event when I close the dialog by clicking close box(red button).
In the case of the browser UI, even in the Mac, I can correctly get event.
What is the cause which can't get the unload/beforeunload event on the plug-in? If this way is wrong,please tell me the way to detect the dialog being closed. Or is there a way which doesn't display close box(red button) to prevent being closed by clicking close box(red button)?