Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#9613 closed bug (duplicate)

Difference in ui.position depending on animate setting

Reported by: OliverSalzburg Owned by: OliverSalzburg
Priority: minor Milestone: none
Component: ui.resizable Version: 1.10.3
Keywords: Cc:
Blocked by: Blocking:

Description (last modified by Scott González)

I am working on a component where you can move markers on a grid. The markers can be dragged and dropped inside that grid and they can be horizontally resized.

When resizing a marker, I noticed that it would also change it's position slightly. This only seemed to happen when enabling animation for the resize operation.

While investigating this issue, I came across some behavior that seemed weird to me. You can observe this in this fiddle: http://jsfiddle.net/qjpKC/3/

The fiddle will create a single marker on an imaginary grid. When, for example, increasing the width of the marker by one unit, the output in the console should look like:

start Object {left: 94, top: 75}
resize Object {left: 94, top: 75}
stop Object {left: 66, top: 55} 

However, when changing the animate property in the resizable call to false, the values in the log entry corresponding to the stop event have changed:

start Object {left: 66, top: 55}
resize Object {left: 66, top: 55}
stop Object {left: 66, top: 55} 

Change History (5)

comment:1 Changed 7 years ago by Scott González

Description: modified (diff)

comment:2 Changed 7 years ago by tj.vantoll

Owner: set to OliverSalzburg
Status: newpending

Hi OliverSalzburg,

Thanks for taking the time to contribute to the jQuery UI project. Does this behavior occur without the grid option set and/or the draggable widget applied. The more you can reduce the problem the better we're able to figure out what's going on here. I'm also wondering whether this is a duplicate of #5027.

Thanks!

comment:3 in reply to:  2 Changed 7 years ago by OliverSalzburg

Status: pendingnew

Replying to tj.vantoll:

Does this behavior occur without the grid option set and/or the draggable widget applied.

You're right. The grid doesn't really seem to be of any relevance in this context. Neither does being draggable. I removed some code from the fiddle to reflect this: http://jsfiddle.net/qjpKC/5/

I'm also wondering whether this is a duplicate of #5027.

That's hard for me to judge, but it sounds unrelated to me.

comment:4 Changed 7 years ago by tj.vantoll

Resolution: duplicate
Status: newclosed

Duplicate of #7453.
Thanks. Seeing this reduced makes is easier to see the problem. This is actually a duplicate of #7453.

comment:5 in reply to:  4 Changed 7 years ago by OliverSalzburg

Replying to tj.vantoll:

Duplicate of #7453.
Thanks. Seeing this reduced makes is easier to see the problem. This is actually a duplicate of #7453.

Ah, I see, great.

I just wanted to point out that #7453 talks about size, while the problem I noticed is related to position (even though the position of the resizeable doesn't change).

Note: See TracTickets for help on using tickets.