Skip to content

Commit 956c2cd

Browse files
committed
Core: Access offsetHeight on div for support tests to avoid a layout bug in IE 9. Fixes #8026 - minHeight support test affects page layout in IE 9.
1 parent 15e73e3 commit 956c2cd

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

ui/jquery.ui.core.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,11 @@ $(function() {
223223
var body = document.body,
224224
div = body.appendChild( div = document.createElement( "div" ) );
225225

226+
// access offsetHeight before setting the style to prevent a layout bug
227+
// in IE 9 which causes the elemnt to continue to take up space even
228+
// after it is removed from the DOM (#8026)
229+
div.offsetHeight;
230+
226231
$.extend( div.style, {
227232
minHeight: "100px",
228233
height: "auto",

0 commit comments

Comments
 (0)