Bug Tracker

Opened 9 years ago

Closed 9 years ago

Last modified 7 years ago

#8190 closed bug (duplicate)

Regression with chaining multiple delay + animation calls

Reported by: cnanney Owned by:
Priority: high Milestone: 1.5.1
Component: effects Version: 1.5
Keywords: Cc:
Blocked by: Blocking:

Description

In upgrading to 1.5, my flip counter script stopped working. I've created a test case here:

http://jsfiddle.net/cnanney/3QsYY/

You can see the animation works in 1.4.4, but when you switch to 1.5 and run it, nothing happens.

Change History (10)

comment:1 Changed 9 years ago by cnanney

I've reduced this further to a single frame of animation:

http://jsfiddle.net/cnanney/3QsYY/1/

Works in 1.4.4, not in 1.5. Seems an animation will not fire if chained to a delay.

comment:2 Changed 9 years ago by Rick Waldron

Component: unfiledeffects
Priority: undecidedhigh
Status: newopen

Confirmed - but you're second "reduced" test doesn't work at all.

comment:3 Changed 9 years ago by cnanney

The second example was only one frame of the animation, which was kind of hard to see, but you'll notice the top of the digit has started to fall. This one is easier to see: http://jsfiddle.net/cnanney/3QsYY/2/

comment:4 Changed 9 years ago by jitter

Milestone: 1.next1.5.1
Resolution: duplicate
Status: openclosed

This isn't a bug. The animate() documentation reads:

All animated properties should be animated to a single numeric value

background-position isn't a property that consists of a single numeric value.

comment:5 Changed 9 years ago by jitter

Duplicate of #8160.

comment:6 Changed 9 years ago by cnanney

@jitter, thanks for the quick response. Fixed by separating into backgroundPositionX and Y animations.

comment:7 in reply to:  6 Changed 9 years ago by jitter

Replying to cnanney:

@jitter, thanks for the quick response. Fixed by separating into backgroundPositionX and Y animations.

np. But you might need to be careful there as (afaik) not all browsers support backgroundPositionX/Y .

comment:8 Changed 9 years ago by cnanney

You're right... works fine on Webkit and IE, but not Firefox and Opera. Of course.

So jQuery lost the ability to animate background positions without the use of an external plugin (cssHooks)? Interesting.

comment:9 Changed 9 years ago by dmethvin

If the background-position animation worked at any point, it was by luck and not by design. The docs have always said that "All animated properties should be animated to a single numeric value."

comment:10 Changed 9 years ago by cnanney

Thanks for all the information. In my situation using animate() in this way wasn't even the most efficient solution anyway.

However, I did notice some strange behavior with regards to background-position animation: When supplying two values with 'px' (20px 30px), it worked in all browsers in 1.4.4, and none in 1.5. But when only the first has px (20px 30), it is the opposite, works in 1.5, but not for 1.4.4:

http://jsfiddle.net/cnanney/3QsYY/5/

The change in the rfxnum regex doesn't seem to support this change in behavior. I guess if it was never officially supported anyway, I'm glad to have stopped using it. Thanks again.

Note: See TracTickets for help on using tickets.