Opened 14 years ago

Closed 13 years ago

Last modified 9 years ago

#4696 closed bug (wontfix)

Bug with revert and grid : the element goes back to a bad position

Reported by: yotsumi Owned by:
Priority: major Milestone: 1.9.0
Component: ui.draggable Version: 1.7.2
Keywords: grid, revert Cc:
Blocked by: Blocking:

Description

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 see it on Firefox 3.5, Firefox 3.1, IE8, IE7 ...

See the example below

Attachments (2)

bug jquery ui.rar (26.5 KB) - added by yotsumi 14 years ago.
bug.html (1.0 KB) - added by yotsumi 14 years ago.
Bug html file

Download all attachments as: .zip

Change History (7)

Changed 14 years ago by yotsumi

Attachment: bug jquery ui.rar added

comment:1 Changed 14 years ago by yotsumi

I think that this error can be resolved by making the following modification, but don't ask me how's that work!

In ui.draggable

_mouseStart: function(event) {

Before : this.originalPosition = this._generatePosition(event); [line 99]
Add :

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

Changed 14 years ago by yotsumi

Attachment: bug.html added

Bug html file

comment:2 Changed 14 years ago by Jörn Zaefferer

Milestone: TBD1.8

comment:3 Changed 13 years ago by wojtek.szkutnik

I confirm:

adding

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

before or after

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

in JQuery UI Draggable fixes the problem. This exact code is present in JQuery UI Sortable but seems to be missing in Draggable.

comment:4 Changed 13 years ago by Scott González

Resolution: wontfix
Status: newclosed

These options won't exist in the rewrite.

comment:5 Changed 9 years ago by Scott González

#9702 is a duplicate of this ticket.

Note: See TracTickets for help on using tickets.