Make sure that height/width getters work on hidden inputs and disconnected elements. Fixes #7225.
This commit is contained in:
parent
3df41db036
commit
e4a38670b1
2 changed files with 23 additions and 1 deletions
|
@ -169,6 +169,10 @@ jQuery.each(["height", "width"], function( i, name ) {
|
|||
});
|
||||
}
|
||||
|
||||
if ( val < 0 || val === 0 && !jQuery.contains( elem.ownerDocument.documentElement, elem ) ) {
|
||||
return elem.style[ name ] || "0px";
|
||||
}
|
||||
|
||||
return val + "px";
|
||||
}
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue