git.asbjorn.biz
/
jquery.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
905a0ae
)
Fixed bug with jQuery: height computation for hidden elements
author
Klaus Hartl
<klaus.hartl@googlemail.com>
Fri, 1 Sep 2006 16:04:50 +0000
(16:04 +0000)
committer
Klaus Hartl
<klaus.hartl@googlemail.com>
Fri, 1 Sep 2006 16:04:50 +0000
(16:04 +0000)
src/jquery/jquery.js
patch
|
blob
|
history
diff --git
a/src/jquery/jquery.js
b/src/jquery/jquery.js
index
f7f3997
..
9daa400
100644
(file)
--- 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({
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];
}).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;
oHeight = e.clientHeight;
oWidth = e.clientWidth;
+ if ( parPos == "" || parPos == "static" )
+ e.parentNode.style.position = "static";
+
e.parentNode.removeChild(e);
}
});
e.parentNode.removeChild(e);
}
});