Windows opened by window.open() do not reflect the specified size and position in Microsoft Edge
Warning
The retired, out-of-support Internet Explorer 11 desktop application has been permanently disabled through a Microsoft Edge update on certain versions of Windows 10. For more information, see Internet Explorer 11 desktop app retirement FAQ.
This article provides information about the value set by calling window.open()
function will not be reflected in the new window of Microsoft Edge.
Original product version: Internet Explorer
Original KB number: 3146494
Consider the following scenario:
- You open a webpage in Microsoft Edge.
- The webpage calls the
window.open()
function and sets values to specify the size and position of the window. - The window that calls the
window.open()
function is not maximized. In this scenario, the specified size, and position are not reflected in the new window.
You can follow these steps to reproduce this issue:
Save the following HTML code as original.html.
JavaScript<!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <title>window.open - TEST</title> <script type="text/javascript"> function win_open1() { window.open('about:blank','','titlebar=yes,toolbar=yes,location=yes,status=no,menubar=yes,scrollbars=yes,resizable=yes,width=700,Height=300,left=0,top=0'); } </script> </head> <body> <input type="button" name="btn1" value="btn1" onclick="win_open1();" />width=700,Height=300,left=0,top=0<br> </body> </html>
Open original.html in Microsoft Edge.
If the Edge window size is maximized, restore it to normal size.
Click button to call the
window.open
function with width 700 px and height 300-px parameters. In this scenario, the size of the opened window is not 700x300 as expected.