Make sure that non-px values aren't manipulated before input to height/width.

This commit is contained in:
John Resig 2010-09-21 17:12:42 -04:00
parent 1ac3713e7f
commit e3463946e1
2 changed files with 5 additions and 2 deletions

View file

@ -155,7 +155,7 @@ jQuery.each(["height", "width"], function( i, name ) {
},
set: function( elem, value ) {
if ( value !== "" ) {
if ( rnumpx.test( value ) ) {
// ignore negative width and height values #1599
value = parseFloat(value);