Commit d1f3dc9a authored by John Resig's avatar John Resig

Make sure that empty height/width values are still set.

parent 99fcf3ba
...@@ -150,11 +150,16 @@ jQuery.each(["height", "width"], function( i, name ) { ...@@ -150,11 +150,16 @@ jQuery.each(["height", "width"], function( i, name ) {
}, },
set: function( elem, value ) { set: function( elem, value ) {
// ignore negative width and height values #1599 if ( value !== "" ) {
value = parseFloat(value); // ignore negative width and height values #1599
value = parseFloat(value);
if ( value >= 0 ) { if ( value >= 0 ) {
return value + "px"; return value + "px";
}
} else {
return value;
} }
} }
}; };
......
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