Commit efaf375e authored by jeresig's avatar jeresig

Need to also handle the case where 'auto' is being returned, as in Firefox. Follow-up to #7395.

parent 3394d32e
...@@ -179,7 +179,7 @@ jQuery.each(["height", "width"], function( i, name ) { ...@@ -179,7 +179,7 @@ jQuery.each(["height", "width"], function( i, name ) {
if ( val != null ) { if ( val != null ) {
// Should return "auto" instead of 0, use 0 for // Should return "auto" instead of 0, use 0 for
// temporary backwards-compat // temporary backwards-compat
return val === "" ? "0px" : val; return val === "" || val === "auto" ? "0px" : val;
} }
} }
...@@ -188,7 +188,7 @@ jQuery.each(["height", "width"], function( i, name ) { ...@@ -188,7 +188,7 @@ jQuery.each(["height", "width"], function( i, name ) {
// Should return "auto" instead of 0, use 0 for // Should return "auto" instead of 0, use 0 for
// temporary backwards-compat // temporary backwards-compat
return val === "" ? "0px" : val; return val === "" || val === "auto" ? "0px" : val;
} }
return typeof val === "string" ? val : val + "px"; return typeof val === "string" ? val : val + "px";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment