admin管理员组文章数量:1313802
In MS Edge (windows 10 build 10162), window.open call only works correctly the first time, but subsequent window.open calls only shows a blue screen with the e logo.
<body onclick="myOpen();">
<p>Click this page and window.open() is called.</p>
<script>
function myOpen() {
window.open("/", null, "height=200, width=400, status=yes, toolbar=no, menubar=no, location=no");
}
</script>
</body>
See demo here: / Click on the page, close the pop up window, and click on it again. There's a blue screen.
I filed another issue with window.open described in detail here, which appeared fixed at first, now I've run into this issue.
In MS Edge (windows 10 build 10162), window.open call only works correctly the first time, but subsequent window.open calls only shows a blue screen with the e logo.
<body onclick="myOpen();">
<p>Click this page and window.open() is called.</p>
<script>
function myOpen() {
window.open("http://jsfiddle/sbhat/f74wt293/", null, "height=200, width=400, status=yes, toolbar=no, menubar=no, location=no");
}
</script>
</body>
See demo here: http://jsfiddle/sbhat/f74wt293/1/ Click on the page, close the pop up window, and click on it again. There's a blue screen.
I filed another issue with window.open described in detail here, which appeared fixed at first, now I've run into this issue.
Share Improve this question edited May 23, 2017 at 11:44 CommunityBot 11 silver badge asked Jul 14, 2015 at 19:58 SudiSudi 1292 gold badges2 silver badges11 bronze badges 5- Also submitted connect.microsoft./IE/feedback/details/1546067 – Sudi Commented Jul 14, 2015 at 20:01
- 1 So.. what are you asking? – Daedalus Commented Jul 16, 2015 at 0:05
- 1 This issue appears to be fixed/resolved in Windows 10 Build 10240. (edited because the OP clearly mentioned their build.) – Ryan Joy Commented Jul 16, 2015 at 4:55
- This is indeed fixed in build 10240. – Sudi Commented Jul 17, 2015 at 19:43
- How can we pass some string value to that window? Can you please answer - stackoverflow./questions/34947586/… – Apparao Commented Jan 22, 2016 at 13:34
4 Answers
Reset to default 3The above answer is only partially correct. Build 10240 corrects the blank box when you open a window for the second time. However, new popup windows still open BEHIND the main browser window around 50% of the time. ie they do not automatically get focus. You only know they are there because the Edge icon on the task bar flashes.
On Build 10162, I got it working here on this JSFiddle http://jsfiddle/RamiSarieddine/wu09fh1d/2/
<a href="#" onclick="openUp()">Click this page and window.open() is called.</a>
<button onclick="openUp()">Click me</button>
function openUp() {
window.open("http://dev.modern.ie/munity/", "_blank", "height=200,width=400,scrollbars=yes,status=yes,location=no");
}
you can see the window opening more than once and you can run the script and click multiple times and it still pops up
Try renaming your window name
upon each open.
window.open(myURL, 'my_window_' + Math.random())
No longer an issue, this is fixed in windows 10 preview build 10240
本文标签: javascriptMicrosoft Edge windowopen only works correctly at first attemptStack Overflow
版权声明:本文标题:javascript - Microsoft Edge: window.open only works correctly at first attempt - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741955069a2406940.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论