title: window.open() is not opening the correct window size on second click
body: <p>I'm trying to open an image in a new window but when I click on the link multiple times, the new window's size is not consistent with what I resize it to. Why is it that the second time I click on the anchor tag, the window does not open into the size I specified? (The first time I click the anchor tag, it opens as I expect with the right size)</p>
  
  <p>JS</p>
  
  <pre><code>&lt;script&gt;
      function openW(a) {
          var i = new Image();
          i.src = "somepic.png";
  
          // open up a new blank
          var w = window.open("", "", "scrollbars=yes");
  
          w.resizeTo(i.width, i.height/2);
          w.document.write('&lt;img src="' + i.src + '"&gt;');
          return false;
      }
  &lt;/script&gt;
  </code></pre>
  
  <p>HTML:</p>
  
  <pre><code>&lt;div class="container"&gt;
      &lt;a target="_blank" onclick="openW('e')"&gt;
          &lt;img src="somepic.png" alt="some pic"&gt;
      &lt;/a&gt;
  &lt;/div&gt;
  </code></pre>