Opened 11 years ago

Closed 10 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)

test.html (1.4 KB) - added by defenestrator 11 years ago.
fix.patch (457 bytes) - added by bman654 10 years ago.
Fixes the problem (tested in my real world app and with supplied test attachment)

Download all attachments as: .zip

Change History (5)

Changed 11 years ago by defenestrator

Attachment: test.html added

comment:1 Changed 11 years ago by Scott González

Milestone: TBD1.8

Changed 10 years ago by bman654

Attachment: fix.patch added

Fixes the problem (tested in my real world app and with supplied test attachment)

comment:2 Changed 10 years ago by bman654

I've uploaded the patch to fix this problem.

comment:3 Changed 10 years ago by Scott González

Resolution: duplicate
Status: newclosed

Duplicate of #4251.

Note: See TracTickets for help on using tickets.