#11469 closed bug (fixed)
Negative margin in animations (.animate)
Reported by: | miskith | Owned by: | lrbabe |
---|---|---|---|
Priority: | blocker | Milestone: | 1.7.2 |
Component: | effects | Version: | 1.7.2rc1 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
$(".class").animate({marginTop: -100}, 400);
This example doesn't work. It worked before 1.7.2rc1 and negative margin value is normal. Now when I use something like this script, animation dies and margin-top is 0px.
PS: It's not important that the example is with margin-top. Problem is with all margins (margin-* and margin).
Change History (9)
comment:1 Changed 11 years ago by
Owner: | set to miskith |
---|---|
Status: | new → pending |
comment:3 Changed 11 years ago by
Milestone: | None → 1.7.2 |
---|---|
Owner: | changed from miskith to lrbabe |
Priority: | undecided → blocker |
Status: | pending → assigned |
comment:4 Changed 11 years ago by
By fixing #11415 we broke the ability to animate margins to negative values.
Here's a PR that solves it without reverting completely the fix for #11415: https://github.com/jquery/jquery/pull/710
comment:5 Changed 11 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Fix #11469. Exclude margins from the negative property check.
Changeset: 07c8a9b2448f42ee940e7fc1351344eb372f7463
comment:6 Changed 11 years ago by
Replying to miskith:
$(".class").animate({marginTop: -100}, 400);This example doesn't work. It worked before 1.7.2rc1 and negative margin value is normal. Now when I use something like this script, animation dies and margin-top is 0px.
PS: It's not important that the example is with margin-top. Problem is with all margins (margin-* and margin).
comment:7 Changed 11 years ago by
Component: | unfiled → effects |
---|
comment:8 Changed 11 years ago by
Seems to me that the bug is still in the current version included. cant marginLeft to negative values
comment:9 Changed 11 years ago by
Thanks for contributing, anonymous. Please prove your claims with a test case. Thanks!
Thanks for taking the time to contribute to the jQuery project! Please provide a complete reduced test case on jsFiddle to help us assess your ticket.
Additionally, be sure to test against the jQuery Edge version to ensure the issue still exists. To get you started, use this boilerplate: http://jsfiddle.net/FrKyN/ Open the link and click to "Fork" (in the top menu) to get started.