Only set height/width if it's a non-negative number (don't set it to 0).
This commit is contained in:
parent
cb3a9c14f1
commit
8b7015987c
1 changed files with 5 additions and 1 deletions
|
@ -123,7 +123,11 @@ jQuery.each(["height", "width"], function( i, name ) {
|
|||
|
||||
set: function( elem, value ) {
|
||||
// ignore negative width and height values #1599
|
||||
return Math.max( parseFloat(value), 0 ) + "px";
|
||||
value = parseFloat(value);
|
||||
|
||||
if ( value >= 0 ) {
|
||||
return value + "px";
|
||||
}
|
||||
}
|
||||
};
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue