locked
Microsoft Edge window.open() not honoring width height, and opens in background RRS feed

  • Question

  • I'm on windows 10 preview Build 10074, and the window.open method in new Edge browser isn't behaving as per the specification.

    If you use the below example code and click to open a new window, it will open a new window will completely ignore the width and height.  is this issue with Edge browser? or my code is the problem?

    <!DOCTYPE html>
        <html>
        <head>
          <title>window.open()</title>
          <style>
            html, body {
                width: 100%;
                height: 100%;
                border: 1px solid black;
            }
            </style>
        </head>
        <body onclick="myOpen();">
          <p>Click this page and window.open() is called.</p>
          <script>
            function myOpen() {
              window.open("Sample.htm", null, "height=200, width=400, status=yes, toolbar=no, menubar=no, location=no");
            }
          </script>
        </body>
        </html>

    Monday, June 22, 2015 9:32 AM

All replies

  • hello since you are trying to open a popup window try this.. tell us the result

    "use strict"
    var window; 
    function myOpen() {
            window = window.open("Sample.htm", "_blank", "height=200, width=400, status=yes, toolbar=no, menubar=no);
    window.focus();
            }



    Hope it helps. Spiri

    Monday, June 22, 2015 9:43 AM
  • Thank you for your reply Spiri. I tried which have mentioned above but still I am facing the same problem.

    Monday, June 22, 2015 10:16 AM
  • strange.. this works in all the major browsers.. even internet explorer..

    i haven't tried edge.

    maybe there is some settings against popups... ?

    but maybe someone from here knows better..


    Hope it helps. Spiri

    Monday, June 22, 2015 10:36 AM
  • change the starting node for html and script to this :

    i don't really thing it will change anything but you can give it a try

    maybe this will do the trick

    <script type="text/javascript">

    <html xmlns="http://www.w3.org/1999/xhtml">


    Hope it helps. Spiri



    • Edited by Spiri91 Monday, June 22, 2015 10:51 AM
    Monday, June 22, 2015 10:49 AM
  • Modified and tried but still the same problem
    <!DOCTYPE html>
        <html xmlns="http://www.w3.org/1999/xhtml">
        <head>
          <title>window.open()</title>
          <style>
            html, body {
                width: 100%;
                height: 100%;
                border: 1px solid black;
            }
            </style>
        </head>
        <body onclick="myOpen();">
          <p>Click this page and window.open() is called.</p>
          <script type="text/javascript">
            var window; 
    		function myOpen(){
    			window = window.open("Sample.htm", "_blank","height=200, width=400, status=yes, toolbar=no, menubar=no");
    			window.focus();
    		}
          </script>
        </body>
        </html>

    Monday, June 22, 2015 11:20 AM
  • I have seen one issue has been created in official Microsoft website(the issue id is:1400158). may I know when they are planning to fix this issue? or Do we have any work-around for this issue like change some browser settings...?
    Monday, June 22, 2015 11:43 AM
  • We all waste a lot of time on this issue. It would be nice if Micsosoft would just admit that this is an error in edge and give an estimated time for a fix. Window.Open does not Work. It opens e new window behind the parent. We have been waiting for at fix the last year. That is not OK. We does not need at Work around. We need a fix.
    Thursday, March 31, 2016 7:21 PM