aboutsummaryrefslogtreecommitdiffstats
path: root/src/css.js
diff options
context:
space:
mode:
authorjeresig <jeresig@gmail.com>2010-11-09 23:33:18 -0500
committerjeresig <jeresig@gmail.com>2010-11-09 23:33:18 -0500
commitefaf375e56920c9699c3d4ef09fb9171352aa8bb (patch)
treec7a885c9c76da7b982c52c3ae0437352c657baa0 /src/css.js
parent3394d32ea75cffb8c8c386d607823cae878b9145 (diff)
downloadjquery-efaf375e56920c9699c3d4ef09fb9171352aa8bb.tar.gz
jquery-efaf375e56920c9699c3d4ef09fb9171352aa8bb.zip
Need to also handle the case where 'auto' is being returned, as in Firefox. Follow-up to #7395.
Diffstat (limited to 'src/css.js')
-rw-r--r--src/css.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/css.js b/src/css.js
index 369485e47..8a83c6072 100644
--- a/src/css.js
+++ b/src/css.js
@@ -179,7 +179,7 @@ jQuery.each(["height", "width"], function( i, name ) {
if ( val != null ) {
// Should return "auto" instead of 0, use 0 for
// temporary backwards-compat
- return val === "" ? "0px" : val;
+ return val === "" || val === "auto" ? "0px" : val;
}
}
@@ -188,7 +188,7 @@ jQuery.each(["height", "width"], function( i, name ) {
// Should return "auto" instead of 0, use 0 for
// temporary backwards-compat
- return val === "" ? "0px" : val;
+ return val === "" || val === "auto" ? "0px" : val;
}
return typeof val === "string" ? val : val + "px";