Search and Top Navigation
#4476 closed bug (duplicate)
Opened April 16, 2009 08:33AM UTC
Closed September 20, 2009 09:10PM UTC
Colour animations sometimes fail due to NaNs
Reported by: | defenestrator | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | 1.8 |
Component: | ui.effects.core | Version: | 1.7.1 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
Also seen in #4251, #4216 and probably others, colour animations sometimes don't happen due to NaNs. I've reproduced it, written a test case, found what I believe to be the bug ...
if ( fx.state == 0 ) { fx.start = getColor( fx.elem, attr ); fx.end = getRGB( fx.end ); }
... and found the fix: replace the if statement with "if ( fx.start.constructor != Array)". This is because there's no guarantee that fx.state will be 0 on the first call.
The attached test case animates the backgrounds of 2500 or 10,000 divs from white to black. A small number of divs stay white. I suggest using Firefox for the test.