rhezatesar / simplemodal

Automatically exported from code.google.com/p/simplemodal
0 stars 0 forks source link

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

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
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.

Original issue reported on code.google.com by zhoushu...@gmail.com on 13 May 2008 at 2:38

Attachments:

GoogleCodeExporter commented 9 years ago
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.

Original comment by emartin24 on 14 May 2008 at 4:31

GoogleCodeExporter commented 9 years ago
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});

Original comment by zhoushu...@gmail.com on 15 May 2008 at 4:28

Attachments:

GoogleCodeExporter commented 9 years ago
Check out 1.2 and see if this has been resolved

Original comment by emartin24 on 4 Dec 2008 at 6:41