Topic: Problem with isDirty() and onbeforeunload?
I love TinyMCE, but I have some troubles using the isDirty() function. I am using IE11 and tinyMCE 4.4.1.
First it seems that in window.onbeforeunload the value returned by isDirty() is not always reliable.
If I close IE, use the previous button or click a <a>-link it works perfect.
This leads me to a second question, because when the onbeforeunload event is fired and the users elects to stay on the page then isDirty() seems to reset to false. In other words, isDirty is true, user gets stay-or-leave prompt and selects "stay": isDirty is false...?
If there would be an option to check whether the user clicked stay-or-leave I could construct a workaround to trap this, but I am not aware of such an event. Even so, I doubt that isDirty() is meant to be used that way. I thought it would be easier .
I am not a real js/jquery code pro so I just wonder if this is a known issue (or issues), or did I make wrong assumptions about using isDirty()?
Thanks for your replies!