Skip to content

Commit 409f5d1

Browse files
committed
Core: Improvements to minHeight support test. Thanks jdalton.
1 parent 0050f23 commit 409f5d1

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

ui/jquery.ui.core.js

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -217,14 +217,18 @@ $.extend( $.expr[ ":" ], {
217217

218218
// support
219219
$(function() {
220-
var div = document.createElement( "div" );
221-
div.style.minHeight = "100px";
220+
var div = document.createElement( "div" ),
221+
body = document.body;
222222

223-
document.body.appendChild( div );
224-
$.support.minHeight = div.offsetHeight === 100;
225-
document.body.removeChild( div ).style.display = "none";
223+
$.extend( div.style, {
224+
minHeight: "100px",
225+
height: "auto",
226+
padding: 0,
227+
borderWidth: 0
228+
});
226229

227-
div = null;
230+
$.support.minHeight = body.appendChild( div ).offsetHeight === 100;
231+
body.removeChild( div );
228232
});
229233

230234

0 commit comments

Comments
 (0)