Skip to content

Commit efaf375

Browse files
committed
Need to also handle the case where 'auto' is being returned, as in Firefox. Follow-up to #7395.
1 parent 3394d32 commit efaf375

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/css.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ jQuery.each(["height", "width"], function( i, name ) {
179179
if ( val != null ) {
180180
// Should return "auto" instead of 0, use 0 for
181181
// temporary backwards-compat
182-
return val === "" ? "0px" : val;
182+
return val === "" || val === "auto" ? "0px" : val;
183183
}
184184
}
185185

@@ -188,7 +188,7 @@ jQuery.each(["height", "width"], function( i, name ) {
188188

189189
// Should return "auto" instead of 0, use 0 for
190190
// temporary backwards-compat
191-
return val === "" ? "0px" : val;
191+
return val === "" || val === "auto" ? "0px" : val;
192192
}
193193

194194
return typeof val === "string" ? val : val + "px";

0 commit comments

Comments
 (0)