You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by Anshu Jain <an...@oracle.com> on 2012/12/14 11:19:50 UTC

Query regarding the popup window size in IE

Hi,

I noticed a strange behavior in when a dialog box is opened having a 
fixed size. In this example, the width of the popup window is set to 600 
px and height 600 px.
When the popup is opened using a button, the size of the popup window in 
IE (7, 8 and 9) is 640x684. Also, the frame size inside the popup is 
626x594.

For the same case, in Mozilla Firefox and Chrome, the frame size opens 
to be 600x600.

On analysis, I found that in the _sizeWin() method in Window.js, no 
execution is done for Chrome and Firefox, since the body object is null.

...
var body =  theWindow.document.body;
if (body)
{
  ...
  ...
}
}

But, in case of IE body object is not null, and newWidth and newHeight 
are calculated and the window is resized to an this new size which seems 
to be incorrect. Because of this part of the code, the popup window is 
never opened in the size defined and IE behaves in a different way than 
Friefox and Chrome.

I tried bypassing this entire code and checked the popup window size, 
and found that without this code execution, the IE behaves in the same 
way as Firefox and Chrome and opens a popup with frame size as defined 
in the parameters.

My query was that is there a special reason that this calculation is 
done for IE with Windows? Is the reason valid even in case of newer 
versions of IE like IE8 and IE9?

Thanks and Regards,
Anshu