IE8 morph Invalid argument #2391

Closed
TheShrike opened this Issue Aug 6, 2012 · 3 comments

Comments

Projects
None yet
3 participants

http://jsfiddle.net/YwQzB/1/

'Invalid argument' error, line 3772:

this.style[property] = value;

property = borderLeft
value = NaN NaN NaN NaN 216)

Contributor

gonchuki commented Aug 13, 2012

Some info on this one:

  • Happens on both IE7 and IE8
  • It's not a regression, I could also reproduce on the fiddle using 1.3.2 and 1.2.5
  • the most I could find out is that this is failing after the first morph, where IE begins returning the style for borderLeft in the wrong order (returning color width style instead of width style color)

I will keep looking at this, will be back with a pull request if I can find the source of this issue.

Contributor

gonchuki commented Aug 13, 2012

so the source is simply a bug on IE7/8, where assigning the 3 components of a border side (either via the shorthand or using the 3 individual styles), a later retrieval of that value comes with the aforementioned incorrect order. Note that it also returns the incorrect order when using the border shorthand (that is, setting/getting all 4 borders at once)

The only thing I can think of is setting a feature detect for this bug, and in such case get an additional step on getStyle to reorder the components.
Any voice against this suggestion? else I will get working onto the pull request :)

Owner

arian commented Aug 13, 2012

Awesome @gonchuki, so basically .getStyle('border-left') returns the properties in a different order than other browsers, which returns in NaNs eventually... so that'd be good to fix.

arian closed this Aug 16, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment