Status: Unconfirmed
Owner: all-bugs-t...@chromium.org
Labels: Type-Bug Pri-2 OS-All Area-Misc

New issue 6192 by martin.s...@virgin.net: Collapsed javascript window
http://code.google.com/p/chromium/issues/detail?id=6192

Chrome Version       : 1.0.154.36
URLs (if applicable) :
Other browsers tested:
   Add OK or FAIL after other browsers where you have tested this issue:
      Safari 3:OK
     Firefox 3:OK
          IE 7:OK

What steps will reproduce the problem?

  function wopen(url, name, w, h)
{
   // Fudge factors for window decoration space.
   w += 32;
   h += 96;
   wleft = (screen.width - w) / 2;
   wtop = (screen.height - h) / 2;
   // IE5 and other old browsers might allow a window that is
   // partially offscreen or wider than the screen. Fix that.
   if (wleft < 0) {
     w = screen.width;
     wleft = 0;
   }
   if (wtop < 0) {
     h = screen.height;
     wtop = 0;
   }
   var win = window.open(url,
     name,
     'width=' + w + ', height=' + h + ', ' +
     'left=' + wleft + ', top=' + wtop + ', ' +
     'location=no, menubar=no, ' +
     'status=yes, toolbar=no, scrollbars=yes, resizable=no');
   // Just in case width and height are ignored
   win.resizeTo(w, h);
   // Just in case left and top are ignored
   win.moveTo(wleft, wtop);
   win.focus();
}


What is the expected result?
Should produce a new centered javascript window matching the dimensions
entered when the script is called.

What happens instead?
Produces a collapsed window only a few cm sq. It does however appear to be
centered on the screen.

Please provide any additional information below. Attach a screenshot if
possible.


--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings

--~--~---------~--~----~------------~-------~--~----~
Automated mail from issue updates at http://crbug.com/
Subscription options: http://groups.google.com/group/chromium-bugs
-~----------~----~----~----~------~----~------~--~---

Reply via email to