aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKlaus Hartl <klaus.hartl@googlemail.com>2006-09-01 16:04:50 +0000
committerKlaus Hartl <klaus.hartl@googlemail.com>2006-09-01 16:04:50 +0000
commit744c0609d4848d89c528f1eb61c596ee4bc0d393 (patch)
treed331cc1402df67d006a0ce918b60e34dfc336d08 /src
parent905a0ae351260b38ca2fba4e470d77524f62ffa4 (diff)
downloadjquery-744c0609d4848d89c528f1eb61c596ee4bc0d393.tar.gz
jquery-744c0609d4848d89c528f1eb61c596ee4bc0d393.zip
Fixed bug with jQuery: height computation for hidden elements
Diffstat (limited to 'src')
-rw-r--r--src/jquery/jquery.js9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/jquery/jquery.js b/src/jquery/jquery.js
index f7f3997d9..9daa40035 100644
--- a/src/jquery/jquery.js
+++ b/src/jquery/jquery.js
@@ -1168,12 +1168,19 @@ jQuery.extend({
oWidth = e.offsetWidth;
} else {
e = jQuery(e.cloneNode(true)).css({
- visibility: "hidden", position: "absolute", display: "block"
+ visibility: "hidden", position: "absolute", display: "block", right: "0", left: "0"
}).appendTo(e.parentNode)[0];
+ var parPos = jQuery.css(e.parentNode,"position");
+ if ( parPos == "" || parPos == "static" )
+ e.parentNode.style.position = "relative";
+
oHeight = e.clientHeight;
oWidth = e.clientWidth;
+ if ( parPos == "" || parPos == "static" )
+ e.parentNode.style.position = "static";
+
e.parentNode.removeChild(e);
}
});