Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#9702 closed bug (duplicate)

Draggable the element goes back to a bad position with revert and grid enabled

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

Description

The exactly same as ticket #4696. Quote its description here:

"I have find a bug on the ui.draggable component which appears when i use the options grid and revert. When you move the draggable element, the first time it goes back to its initial position, but after, he goes back to a bad position ( a little gap )."

I saw it happens on Chrome(31.0.1650.63) & Safari browser.

Change History (4)

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

Resolution: duplicate
Status: newclosed

Duplicate of #4696.
Please don't file duplicate tickets. The original is clearly marked as something that we will not fix because the options are going away.

comment:2 in reply to:  1 Changed 7 years ago by jq77

Replying to scott.gonzalez:

Duplicate of #4696.
Please don't file duplicate tickets. The original is clearly marked as something that we will not fix because the options are going away.

What do you mean "the options are going away"? According to the API documentation (http://api.jqueryui.com/draggable/), the "revert" and "grid" are still options of draggable.

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

Going away means that they currently exist, but will not in the future. See http://blog.jqueryui.com/2011/03/api-redesigns-the-past-present-and-future/

comment:4 in reply to:  3 Changed 7 years ago by jq77

Replying to scott.gonzalez:

Going away means that they currently exist, but will not in the future. See http://blog.jqueryui.com/2011/03/api-redesigns-the-past-present-and-future/

Thanks for the explanation. Just in case someone encounter the same problem, I put a possible solution here.

(

Similar to the solution post in #4696, you have to move following lines in ui.draggable._mouseStart()

this.originalPageX = event.pageX; this.originalPageY = event.pageY;

before the line

this.originalPosition = this.position = this._generatePosition(event);

to fix this issue. )

Note: See TracTickets for help on using tickets.