aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/css.js13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/css.js b/src/css.js
index 87f9abd70..9113be2ae 100644
--- a/src/css.js
+++ b/src/css.js
@@ -150,11 +150,16 @@ jQuery.each(["height", "width"], function( i, name ) {
},
set: function( elem, value ) {
- // ignore negative width and height values #1599
- value = parseFloat(value);
+ if ( value !== "" ) {
+ // ignore negative width and height values #1599
+ value = parseFloat(value);
- if ( value >= 0 ) {
- return value + "px";
+ if ( value >= 0 ) {
+ return value + "px";
+ }
+
+ } else {
+ return value;
}
}
};