diff options
author | John Resig <jeresig@gmail.com> | 2009-12-05 00:10:19 -0500 |
---|---|---|
committer | John Resig <jeresig@gmail.com> | 2009-12-05 00:10:19 -0500 |
commit | b24da33f52f8ce536ae60a6cbffeb2f5cf02bac5 (patch) | |
tree | 8bb205a4a518f232e710a71f52dddaea9a1607fe /src/fx.js | |
parent | 8d1efee3167deedd33bf7f6001823706659704ea (diff) | |
download | jquery-b24da33f52f8ce536ae60a6cbffeb2f5cf02bac5.tar.gz jquery-b24da33f52f8ce536ae60a6cbffeb2f5cf02bac5.zip |
Make sure that width or height don't animate to a negative value. Fixes #3881.
Diffstat (limited to 'src/fx.js')
-rw-r--r-- | src/fx.js | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -432,7 +432,7 @@ jQuery.extend( jQuery.fx, { _default: function(fx){ if ( fx.elem.style && fx.elem.style[ fx.prop ] != null ) { - fx.elem.style[ fx.prop ] = fx.now + fx.unit; + fx.elem.style[ fx.prop ] = (fx.prop === "width" || fx.prop === "height" ? Math.max(0, fx.now) : fx.now) + fx.unit; } else { fx.elem[ fx.prop ] = fx.now; } |