From d5dedfa7763426d6e5b290ff854a08f92a23dc1c Mon Sep 17 00:00:00 2001 From: gmaes Date: Fri, 15 Mar 2013 18:04:24 +0100 Subject: [PATCH] Fix #2428 IE8: Fx.Morph percentage unit issue --- Source/Fx/Fx.CSS.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/Fx/Fx.CSS.js b/Source/Fx/Fx.CSS.js index 60f98d7e8..b614cb257 100644 --- a/Source/Fx/Fx.CSS.js +++ b/Source/Fx/Fx.CSS.js @@ -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