When selecting the close icon on a form with unsaved changes it triggers an onsave event handler.
it then asks if you want to save and close or discard changes.
if I select save and close it triggers a second onsave event handler.
I am trying to add a getEventArgs().preventDefault() to my code and throw an error.
However, because both are getEventArgs().getSaveMode() == 2 it prevents the save and close icon from working.
is there a way I can determine the difference between the two icons?