Microsoft Edge: window.open only works correctly at first attempt

一世执手 提交于 2019-12-06 09:56:25

The 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.net/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/community/", "_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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!