Search code examples
internet-explorertabsinternet-explorer-10internet-explorer-11onbeforeunload

BUG - close IE10 or IE11 is inpossible with onbeforeunload and closing tab


Do you have idea for workaround for it?

Steps to reproduce: 1. Create html file with content.

<html>
<head></head>
<body>
    <script>
        var func = function(){
            return 'xxx';
        };
        window.onbeforeunload  = func;
    </script>
</body>
</html>
  1. Open it in IE.
  2. Click "Allow blocked content".
  3. Open 2nd tab.
  4. Try close 1st, but click "stay on this page".
  5. Close 2nd tab.
  6. Try close 1st tab or IE. It is imposible.

Solution

  • I have answer from Microsoft: "This issue appears to be fixed in MS Edge". You can read it here: https://connect.microsoft.com/IE/feedback/details/1112178/bug-in-ie10-and-ie11-with-onbeforeunload-and-closing