Make sure that the correct height/width of the elements is retreived. Fixes #7225.
This commit is contained in:
parent
d9a3e0080a
commit
7e02cee5ff
2 changed files with 21 additions and 11 deletions
16
src/css.js
16
src/css.js
|
@ -169,11 +169,23 @@ jQuery.each(["height", "width"], function( i, name ) {
|
|||
});
|
||||
}
|
||||
|
||||
if ( val < 0 || val === 0 && !jQuery.contains( elem.ownerDocument.documentElement, elem ) ) {
|
||||
if ( val < 0 ) {
|
||||
return elem.style[ name ] || "0px";
|
||||
}
|
||||
|
||||
return val + "px";
|
||||
if ( val === 0 ) {
|
||||
val = curCSS( elem, name, name );
|
||||
|
||||
if ( val != null ) {
|
||||
return val;
|
||||
}
|
||||
}
|
||||
|
||||
if ( val < 0 || val == null ) {
|
||||
return elem.style[ name ];
|
||||
}
|
||||
|
||||
return typeof val === "string" ? val : val + "px";
|
||||
}
|
||||
},
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue