Side navigation
#8190 closed bug (duplicate)
Opened February 06, 2011 08:42PM UTC
Closed February 07, 2011 12:37AM UTC
Last modified March 14, 2012 07:29PM UTC
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.
Attachments (0)
Change History (10)
Changed February 06, 2011 09:03PM UTC by comment:1
Changed February 06, 2011 11:34PM UTC by comment:2
component: | unfiled → effects |
---|---|
priority: | undecided → high |
status: | new → open |
Confirmed - but you're second "reduced" test doesn't work at all.
Changed February 06, 2011 11:41PM UTC by comment:3
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:
Changed February 07, 2011 12:37AM UTC by comment:4
milestone: | 1.next → 1.5.1 |
---|---|
resolution: | → duplicate |
status: | open → closed |
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.
Changed February 07, 2011 01:03AM UTC by comment:6
@jitter, thanks for the quick response. Fixed by separating into backgroundPositionX and Y animations.
Changed February 07, 2011 01:13AM UTC by comment:7
Replying to [comment:6 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 .
Changed February 07, 2011 01:26AM UTC by comment:8
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.
Changed February 07, 2011 02:13PM UTC by comment:9
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."
Changed February 07, 2011 06:30PM UTC by comment:10
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.
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.