Maintain returning 0px from width/height for disconnected nodes for backwards compat, for now. Fixes #7395.
This commit is contained in:
parent
795e880bba
commit
3394d32ea7
3 changed files with 35 additions and 8 deletions
|
@ -177,13 +177,18 @@ jQuery.each(["height", "width"], function( i, name ) {
|
|||
}
|
||||
|
||||
if ( val != null ) {
|
||||
return val === "" ? "auto" : val;
|
||||
// Should return "auto" instead of 0, use 0 for
|
||||
// temporary backwards-compat
|
||||
return val === "" ? "0px" : val;
|
||||
}
|
||||
}
|
||||
|
||||
if ( val < 0 || val == null ) {
|
||||
val = elem.style[ name ];
|
||||
return val === "" ? "auto" : val;
|
||||
|
||||
// Should return "auto" instead of 0, use 0 for
|
||||
// temporary backwards-compat
|
||||
return val === "" ? "0px" : val;
|
||||
}
|
||||
|
||||
return typeof val === "string" ? val : val + "px";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue