Permalink
Browse files

Fix #2428 IE8: Fx.Morph percentage unit issue

  • Loading branch information...
1 parent 5812b7d commit d5dedfa7763426d6e5b290ff854a08f92a23dc1c @gmaes committed Mar 15, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 Source/Fx/Fx.CSS.js
View
@@ -28,7 +28,7 @@ Fx.CSS = new Class({
from = element.getStyle(property);
var unit = this.options.unit;
// adapted from: https://github.com/ryanmorr/fx/blob/master/fx.js#L299
- if (unit && from && typeof from == 'string' && from.slice(-unit.length) != unit && parseFloat(from) != 0){
+ if (unit && from && typeof from == 'string' && from.slice(-unit.length) != unit && parseFloat(from) != 0 && !isNaN(parseFloat(from))){
element.setStyle(property, to + unit);
var value = element.getComputedStyle(property);
// IE and Opera support pixelLeft or pixelWidth

0 comments on commit d5dedfa

Please sign in to comment.