]> source.dussan.org Git - jquery-ui.git/commitdiff
Core: Improvements to minHeight support test. Thanks jdalton.
authorScott González <scott.gonzalez@gmail.com>
Tue, 7 Sep 2010 16:15:34 +0000 (12:15 -0400)
committerScott González <scott.gonzalez@gmail.com>
Tue, 7 Sep 2010 16:15:34 +0000 (12:15 -0400)
ui/jquery.ui.core.js

index 37a9892e3140c1cfcab1cc1ea9b653d865422253..ff7815c75dac8bae7278fe36dc3705642f77535e 100644 (file)
@@ -217,14 +217,18 @@ $.extend( $.expr[ ":" ], {
 
 // support
 $(function() {
-       var div = document.createElement( "div" );
-       div.style.minHeight = "100px";
+       var div = document.createElement( "div" ),
+               body = document.body;
 
-       document.body.appendChild( div );
-       $.support.minHeight = div.offsetHeight === 100;
-       document.body.removeChild( div ).style.display = "none";
+       $.extend( div.style, {
+               minHeight: "100px",
+               height: "auto",
+               padding: 0,
+               borderWidth: 0
+       });
 
-       div = null;
+       $.support.minHeight = body.appendChild( div ).offsetHeight === 100;
+       body.removeChild( div );
 });