diff options
author | jeresig <jeresig@gmail.com> | 2010-10-22 00:28:33 -0400 |
---|---|---|
committer | jeresig <jeresig@gmail.com> | 2010-10-22 00:28:33 -0400 |
commit | e4a38670b10b1ce776afff389bae34991e986180 (patch) | |
tree | 6ab0685b60061b6ccfc7000366b305729e5b700a /src/css.js | |
parent | 3df41db0369cfaf0fc229c633eb87f222ad49357 (diff) | |
download | jquery-e4a38670b10b1ce776afff389bae34991e986180.tar.gz jquery-e4a38670b10b1ce776afff389bae34991e986180.zip |
Make sure that height/width getters work on hidden inputs and disconnected elements. Fixes #7225.
Diffstat (limited to 'src/css.js')
-rw-r--r-- | src/css.js | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/css.js b/src/css.js index 933d2b45e..f2165f904 100644 --- a/src/css.js +++ b/src/css.js @@ -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"; } }, |