After adding an onbeforeunload event to an enterprise app recently, I noticed that the event would fire whenever the user clicked part of a flash swf. This was occuring even though the user was not leaving the page. In this article, I will show you what causes this and how to fix it. See why inside.