Opened 13 years ago
Closed 13 years ago
#4476 closed bug (duplicate)
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.
Attachments (2)
Change History (5)
Changed 13 years ago by
comment:1 Changed 13 years ago by
Milestone: | TBD → 1.8 |
---|
Changed 13 years ago by
Note: See
TracTickets for help on using
tickets.
Fixes the problem (tested in my real world app and with supplied test attachment)