]> source.dussan.org Git - jquery-ui.git/commitdiff
Core: Access offsetHeight on div for support tests to avoid a layout bug in IE 9...
authorScott González <scott.gonzalez@gmail.com>
Fri, 20 Jan 2012 02:37:21 +0000 (21:37 -0500)
committerScott González <scott.gonzalez@gmail.com>
Fri, 20 Jan 2012 02:38:44 +0000 (21:38 -0500)
(cherry picked from commit 956c2cd2a5a44d40a9b2fb0a8c05f765fa302c92)

ui/jquery.ui.core.js

index 1ca2c6f699d97969f9b42065e84256dc592b68b7..aed64dd8be9d2337710d2364736723fcc667e7ec 100644 (file)
@@ -225,6 +225,11 @@ $(function() {
        var body = document.body,
                div = body.appendChild( div = document.createElement( "div" ) );
 
+       // access offsetHeight before setting the style to prevent a layout bug
+       // in IE 9 which causes the elemnt to continue to take up space even
+       // after it is removed from the DOM (#8026)
+       div.offsetHeight;
+
        $.extend( div.style, {
                minHeight: "100px",
                height: "auto",