0 Replies Latest reply on Feb 19, 2015 12:31 AM by Pulluran

    Unload events of a modal dialog can't be detected in the Mac.

    Pulluran Level 1

      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).


      This is what I've tried:

          window.onunload = function(event) { alert('test')'; }
          window.onunbeforeload = function(event) { alert('test')'; }



      In the Windows, I can correctly get event.

      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)?


      Please let me know.