Export to GitHub

simplemodal - issue #2

A patch for fixing IE 6 to calculate(hack) the width & height of the dialog.


Posted on May 13, 2008 by Happy Bird

If the document.body has scrollbars(that is to say, the page is large than the window), the modal dialog only overlie the left top of the page.

Version 1.1.1, the operating is Windows XP IE6.

The patch is attached.

Attachments

Comment #1

Posted on May 14, 2008 by Massive Ox

Thanks for the patch. The new version that I'm working on should resolve this issue, but I'll make sure to test it out.

Comment #2

Posted on May 15, 2008 by Happy Bird

I make it better(Fix the page content is shorter than the window height), the attachment is the test page:

Index: jquery.simplemodal.js

--- jquery.simplemodal.js (???r?W???? 2) +++ jquery.simplemodal.js (??ƃR?s?[) @@ -263,8 +263,8 @@ * Fix issues in IE 6 */ fixIE: function () { - var wHeight = $(document.body).height() + 'px'; - var wWidth = $(document.body).width() + 'px'; + var wHeight = Math.max(document.body.clientHeight, document.body.scrollHeight) + 'px'; + var wWidth = Math.max(document.body.clientWidth, document.body.scrollWidth) + 'px';

        // position hacks
        this.dialog.overlay.css({position: 'absolute', height: wHeight, width: wWidth});
Attachments

Comment #3

Posted on Dec 4, 2008 by Massive Ox

Check out 1.2 and see if this has been resolved

Status: Fixed

Labels:
Type-Defect Priority-Medium