Commit 8b701598 authored by jeresig's avatar jeresig

Only set height/width if it's a non-negative number (don't set it to 0).

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