Side navigation
#8160 closed bug (duplicate)
Opened February 03, 2011 03:25PM UTC
Closed February 07, 2011 11:13PM UTC
Last modified March 13, 2012 04:02PM UTC
jQuery animate() regression since v1.5
Reported by: | jon301@gmail.com | 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)
Not working with 1.5
Is it a bug or is it not supported anymore ?
Thank you
Jon
Attachments (0)
Change History (15)
Changed February 03, 2011 03:32PM UTC by comment:1
Changed February 03, 2011 04:17PM UTC by comment:2
keywords: | → needsreview |
---|---|
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.
Changed February 07, 2011 12:34AM UTC by comment:4
_comment0: | This got introduced by the fix for #7736 which made the "single numeric value" check for animation more strict (hint: `rfxnum`). \ \ This change also affects e.g. th bgpos-hook of the [https://github.com/brandonaaron/jquery-cssHooks jQuery-cssHooks plugin]. → 1297039164214261 |
---|---|
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.
Changed February 07, 2011 05:39PM UTC by comment:6
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.
Changed February 07, 2011 11:13PM UTC by comment:7
keywords: | needsreview |
---|---|
priority: | high → low |
resolution: | invalid |
status: | closed → reopened |
Changed February 07, 2011 11:13PM UTC by comment:8
resolution: | → duplicate |
---|---|
status: | reopened → closed |
Changed May 04, 2011 04:43PM UTC by comment:10
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.
Changed May 05, 2011 01:20AM UTC by comment:11
#9108 is a duplicate of this ticket.
Changed May 07, 2011 01:55AM UTC by comment:12
#9160 is a duplicate of this ticket.
Changed May 09, 2011 04:00PM UTC by comment:13
#9194 is a duplicate of this ticket.
Changed May 12, 2011 09:01PM UTC by comment:14
Replying to [comment:10 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...
Changed May 20, 2011 03:31PM UTC by comment:15
#9350 is a duplicate of this ticket.
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