BUG - 使用onbeforeunload和关闭选项卡关闭IE10 vs IE11是不可能的

时间:2015-02-02 09:47:39

标签: internet-explorer tabs internet-explorer-10 internet-explorer-11 onbeforeunload

你有解决方法吗?

重现的步骤: 1.创建包含内容的html文件。

<html>
<head></head>
<body>
    <script>
        var func = function(){
            return 'xxx';
        };
        window.onbeforeunload  = func;
    </script>
</body>
</html>
  1. 在IE中打开它。
  2. 点击“允许屏蔽的内容”。
  3. 打开第二个标签。
  4. 尝试关闭第1,但点击“留在此页面上”。
  5. 关闭第二个标签。
  6. 尝试关闭第一个标签或IE。这是不可能的。

1 个答案:

答案 0 :(得分:0)

我从微软回答:&#34;此问题似乎已在MS Edge&#34;中修复。 你可以在这里阅读它: https://connect.microsoft.com/IE/feedback/details/1112178/bug-in-ie10-and-ie11-with-onbeforeunload-and-closing