#8160 closed bug (duplicate)
jQuery animate() regression since v1.5
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | low | Milestone: | 1.5.1 |
Component: | effects | Version: | 1.5 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
jQuery animate() function does not support some CSS properties since v1.5
Example with "backgroundPosition" property : $('#container').animate({backgroundPosition: '160px 50%'}, 1000);
Working with 1.4.4 (and older) http://jsfiddle.net/8CzvY/
Not working with 1.5 http://jsfiddle.net/8CzvY/1/
Is it a bug or is it not supported anymore ?
Thank you
Jon
Change History (15)
comment:1 Changed 12 years ago by
comment:2 Changed 12 years ago by
Keywords: | needsreview added |
---|---|
Milestone: | 1.next → 1.5.1 |
Priority: | undecided → high |
Status: | new → open |
Thanks for taking the time to contribute to the jQuery project by writing a bug report and providing a test case!
You already resolved this ticket all by yourself with the comment. The part of the documentation you quoted applies directly to this ticket. As backgroundPosition
isn't a property with a single numeric value.
So this is basically a dupe of #7755 . You might want to look at my response there for a possible solution.
The reason I keep this ticket open is that this looks like a strange regression from 1.4.4 to 1.5, as there weren't that many changes to the css/animate related code afaik. So we should check what caused this to make sure we didn't break something else which IS supported.
comment:4 Changed 12 years ago by
Component: | unfiled → effects |
---|
This got introduced by the fix for #7736 which made the "single numeric value" check for animation more strict (hint: rfxnum
).
So the cause for your problems is the above mentioned fix which makes animate
actually behave as the documentation describes more strictly.
This change also affects e.g. the bgpos-hook of the jQuery-cssHooks plugin.
comment:6 Changed 12 years ago by
Resolution: | → invalid |
---|---|
Status: | open → closed |
Thanks for the report, but this is not a jQuery bug. The fact that this ever worked was coincidental; animating multi-value properties like background-position
was never supported by default.
comment:7 Changed 12 years ago by
Keywords: | needsreview removed |
---|---|
Priority: | high → low |
Resolution: | invalid |
Status: | closed → reopened |
comment:8 Changed 12 years ago by
Resolution: | → duplicate |
---|---|
Status: | reopened → closed |
comment:10 follow-up: 14 Changed 12 years ago by
Support for animating background-position has been a part of jQuery animate (whether intentional or not) for at least all of 1.2.x, all of 1.3.x, and all of 1.4.x. I find it very unacceptable that this was broken in 1.5.x, that the unit tests did not catch this, and then when it was reported as a bug the response was "this was never intentionally supported, so this is not a bug."
Please reopen this bug report, and fix this issue.
comment:14 Changed 12 years ago by
Replying to zachstronaut:
Support for animating background-position has been a part of jQuery animate (whether intentional or not) for at least all of 1.2.x, all of 1.3.x, and all of 1.4.x. I find it very unacceptable that this was broken in 1.5.x, that the unit tests did not catch this, and then when it was reported as a bug the response was "this was never intentionally supported, so this is not a bug."
Please reopen this bug report, and fix this issue.
Absolutely my opinion, I have a script I use regularly which is not working with jQuery >1.5...it uses the animation of the backgroundPosition proprety for a nice hover effect...you just can't take out a "feature" (as said above, whether intentional or not) out that was "ever" there...
According to the documentation :
"All animated properties should be animated to a single numeric value, except as noted below; most properties that are non-numeric cannot be animated using basic jQuery functionality. (For example, width, height, or left can be animated but background-color cannot be.)"
Maybe it is new since 1.5 ?
Jon