Bug Tracker

Opened 7 years ago

Closed 7 years ago

Last modified 6 years ago

#13561 closed bug (notabug)

animate function not working properly in Chrome

Reported by: noel_fb@… Owned by: noel_fb@…
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 7 years ago by Rick Waldron

Owner: set to noel_fb@…
Status: newpending

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/

comment:3 Changed 7 years ago by anonymous

Mejorado: http://jsfiddle.net/QqJjW/6/

REMEMBER TRY IT IN GOOGLE CHROME!!!

comment:4 Changed 7 years ago by Broda Noel

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 7 years ago by trac-o-bot

Resolution: invalid
Status: pendingclosed

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 7 years ago by samuel

I confirm this bug, it should not be closed.

http://jsfiddle.net/QqJjW/7/ (a little more readable test case)

comment:7 Changed 7 years ago by dmethvin

Resolution: invalid
Status: closedreopened

comment:8 Changed 7 years ago by dmethvin

Status: reopenedpending

It doesn't make sense to animate the left property as a percentage. A percentage of WHAT?

comment:9 Changed 7 years ago by dmethvin

Resolution: notabug
Status: pendingclosed

comment:10 Changed 7 years ago by Broda Noel

A percentage of the parent! or representative!. So we can say: "align left 50 pixels of WHAT?"

comment:11 Changed 7 years ago by Broda Noel

And, YES, is a bug.

comment:12 Changed 6 years ago by lucas.prus@…

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.

Note: See TracTickets for help on using tickets.