onbeforeunload in IE9 leaves the browser hanging under certain circumstances

onbeforeunload in IE9 leaves the browser hanging under certain circumstances

  
Hello everyone!

I've noticed a strange behavior in IE9 (works fine in Chrome).

I wanted a confirmation message to show when the user is navigated away from a page. I used onbeforeunload and it works fine for regular links. When the user tries to navigate away from the page, it shows a message asking the user if they want to "stay on this page" or "leave this page". If they pick "stay on this page", it will remain on the current page. Everything works great.

Now if the link that navigates away from the page is in a popup editor, I noticed that the browser hangs after the user clicks "Stay on this page".

I've attached a stripped down version of the oml. If you click "Navigate Away" on the HomePage, everything works as expected. But if you click the link "Open Popup" and then click "Navigate Away" from within the popup and choose to "Stay on this page" when the browser prompts you, you will see that a "Loading" message appears at the bottom of the screen and the whole page appears to freeze (only in IE9). Also, the "Open Popup" button will not work anymore.

Just wanted to see if anyone else has run into this issue? Any help would be much appreciated!

Thanks!
Bavitha

Steps to reproduce the issue in IE9: 
1) Click Open Popup (in the attached oml).
2) Click the link "Navigate Away" from the popup.
3) A message will show asking the user if they want to leave the page or stay. Choose to stay on the page.
4) The popup will close - but you will notice a "Loading" message at the bottom right of the screen which does not go away. The "Open Popup" button will not work anymore either.