Skip to main content

Search and Top Navigation

#9702 closed bug (duplicate)

Opened December 10, 2013 03:13PM UTC

Closed December 10, 2013 03:15PM UTC

Last modified December 10, 2013 03:36PM UTC

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.

Attachments (0)
Change History (4)

Changed December 10, 2013 03:15PM UTC by scottgonzalez comment:1

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.

Changed December 10, 2013 03:21PM UTC by jq77 comment:2

Replying to [comment:1 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.

Changed December 10, 2013 03:25PM UTC by scottgonzalez comment:3

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/

Changed December 10, 2013 03:36PM UTC by jq77 comment:4

Replying to [comment:3 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.

)