From 9e4455f52d721f2efd4c91037bcd3daf24635599 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Scott=20Gonz=C3=A1lez?= Date: Thu, 19 Jan 2012 21:37:21 -0500 Subject: [PATCH] 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. (cherry picked from commit 956c2cd2a5a44d40a9b2fb0a8c05f765fa302c92) --- ui/jquery.ui.core.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ui/jquery.ui.core.js b/ui/jquery.ui.core.js index 1ca2c6f69..aed64dd8b 100644 --- a/ui/jquery.ui.core.js +++ b/ui/jquery.ui.core.js @@ -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", -- 2.39.5