Open Bug 1231070 Opened 5 years ago Updated 4 years ago

window.open size and position specs are not honored

Categories

(Core :: DOM: Core & HTML, defect)

x86_64
Windows 7
defect
Not set
normal

Tracking

()

UNCONFIRMED

People

(Reporter: eldruin, Unassigned)

Details

(Whiteboard: [DUPEME])

User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:42.0) Gecko/20100101 Firefox/42.0
Build ID: 20151029151421

Steps to reproduce:

(Firefox 42.0 in Windows 7)

Open a window with window.open() and specify width, height, top and left specs.
Example: window.open("/", "title", "width=500, height=200, top=50, left=100", false);

Example in https://jsfiddle.net/8b2j3352/24/ (popups need to be allowed)


Actual results:

The properties of the popup window do not match the specifications passed to window.open().

I get: innerWidth 546 innerHeight 218 outerWidth 561 outerHeight 294 screenX 109 screenY 54


Expected results:

The properties of the popup window match the specifications, which is actually the case when you open the jsfiddle above in Google Chrome. It reports: innerWidth 500 innerHeight 200 outerWidth 510 outerHeight 260 screenX 100 screenY 50
OS: Unspecified → Windows 7
Hardware: Unspecified → x86_64
Component: Widget: Win32 → Widget
Version: 42 Branch → Trunk
Component: Widget → DOM: Core & HTML
Whiteboard: [DUPEME]
I suspect I understand where this problem is in our code, but I want to be sure.

Reporter - are you able to reproduce if the window is in the "restored" state (so not maximized)? If you can't, but you can reproduce when maximized, then I understand how this bug works and can describe it here.
Flags: needinfo?(eldruin)
(Tested in Firefox 47.0.1)
(Assuming you mean that the invoking window should be in restored state, not the popup itself)

The restored/maximized state did not make any difference but the overall firefox configuration appears to play a role:

In a firefox started with a new profile I just created, running this jsfiddle reports:
  innerWidth 497 innerHeight 198 outerWidth 511 outerHeight 259 screenX 98 screenY 49
But this does not change with the restored/maximized state, nor does it when having multiple windows opened in different states.

Disabling all plugins in my normal profile did make a small difference to the original bug report:
  innerWidth 546 innerHeight 218 outerWidth 561 outerHeight 279 screenX 108 screenY 54
Still no change if invoking it in a restored or maximized window.
Flags: needinfo?(eldruin)
You need to log in before you can comment on or make changes to this bug.