aboutsummaryrefslogtreecommitdiffstats
path: root/src/css.js
diff options
context:
space:
mode:
authorjeresig <jeresig@gmail.com>2010-11-09 23:29:26 -0500
committerjeresig <jeresig@gmail.com>2010-11-09 23:29:26 -0500
commit3394d32ea75cffb8c8c386d607823cae878b9145 (patch)
treecba405b182dfcddb1d28996d40e7a2d281cdb08d /src/css.js
parent795e880bba1f7f949df58748f7fd92e50296a8f4 (diff)
downloadjquery-3394d32ea75cffb8c8c386d607823cae878b9145.tar.gz
jquery-3394d32ea75cffb8c8c386d607823cae878b9145.zip
Maintain returning 0px from width/height for disconnected nodes for backwards compat, for now. Fixes #7395.
Diffstat (limited to 'src/css.js')
-rw-r--r--src/css.js9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/css.js b/src/css.js
index 4665fa7cb..369485e47 100644
--- a/src/css.js
+++ b/src/css.js
@@ -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";