#13561 closed bug (notabug)
animate function not working properly in Chrome
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | undecided | Milestone: | None |
Component: | unfiled | Version: | 1.9.1 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
Push this code into a BODY tag:
<div id="xxx" style="position: absolute;right: 40px;top: 0;background-color: #EEE;width: 400px;height: inherit;">PRUEBA</div>
And then try this: $('#xxx').animate({'left': '50%'}, 1000);
In FF is working properly... But NOT in Chrome. In Chrome the element start in the LEFT, and then move to the right (fail). In FF start in the original position, and then move to the left (ok).
Sorry for my bad english.
Change History (12)
comment:1 Changed 10 years ago by
Owner: | set to [email protected]… |
---|---|
Status: | new → pending |
comment:3 Changed 10 years ago by
Mejorado: http://jsfiddle.net/QqJjW/6/
REMEMBER TRY IT IN GOOGLE CHROME!!!
comment:4 Changed 10 years ago by
The problem occurs when an element has defined a "right" in "px", and the animation is defined to make the "right" in "%"
comment:5 Changed 10 years ago by
Resolution: | → invalid |
---|---|
Status: | pending → closed |
Because we get so many tickets, we often need to return them to the initial reporter for more information. If that person does not reply within 14 days, the ticket will automatically be closed, and that has happened in this case. If you still are interested in pursuing this issue, feel free to add a comment with the requested information and we will be happy to reopen the ticket if it is still valid. Thanks!
comment:6 Changed 10 years ago by
I confirm this bug, it should not be closed.
http://jsfiddle.net/QqJjW/7/ (a little more readable test case)
comment:7 Changed 10 years ago by
Resolution: | invalid |
---|---|
Status: | closed → reopened |
comment:8 Changed 10 years ago by
Status: | reopened → pending |
---|
It doesn't make sense to animate the left
property as a percentage. A percentage of WHAT?
comment:9 Changed 10 years ago by
Resolution: | → notabug |
---|---|
Status: | pending → closed |
comment:10 Changed 10 years ago by
A percentage of the parent! or representative!. So we can say: "align left 50 pixels of WHAT?"
comment:12 Changed 10 years ago by
Definitely a bug and should be reopened:
Another fiddle (try that in Chrome): http://jsfiddle.net/lucasprus/GjezT/1/
Inspect the green box and see how 'left' property changes if you click 'Animate left' or 'Animate right'.
That works fine in the rest of my browsers.
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—you may need to change this to a specific version depending on the test case.
To get you started, use this boilerplate: http://jsfiddle.net/FrKyN/ Open the link and click to "Fork" (in the top menu) to begin.
Also, please read: http://blog.jquery.com/2013/01/15/jquery-1-9-final-jquery-2-0-beta-migrate-final-released/