Hi Anshu -

(Adding "[Trinidad]" to the subject to clarify that this issue is
Trinidad-specific.)


On Fri, Dec 14, 2012 at 5:19 AM, Anshu Jain <[email protected]> wrote:

>  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.
>


I am confused why this would be the case.  window.document.body should be
non-null by the time _sizeWin() is called in the onload handler.  Can you
double-check that window.document.body is definitely null and not that some
other logic in the method is diverging across browsers?



>
> ...
> 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?
>
>

The intent of this (very old) sizing code is to attempt to ensure that
there is sufficient space to display the full contents of the window.  I
don't believe that there was ever an intention for this sizing logic to be
limited to IE.

Andy

Reply via email to