Ticket #8218 (closed bug: worksforme)
Drag event firing even when draggable has not moved. ui.position is updating even if item did not move along axis.
|Reported by:||sp2||Owned by:|
There are lots of situations where a mouse down on a draggable, and a slight drag will not actually move a draggable. Examples: draggable is constrained, has an axis setting or draggable has a grid. In these situations, even if the object does not move, the start, drag and stop events still fire, and drag constantly fires while moving cursor, even though object does not move. Worse yet, the ui.originalPosition setting appears to be set sort of randomly to begin with, and ui.position is showing a change along the x axis, even when axis is constrained.
See http://jsfiddle.net/spekary/JxRYP/, based on jQuery UI example code, modified to have a grid and axis setting.
Steps to reproduce: 1) Click top text and move cursor slightly, then release. Will show start, drag and stop events firing even though item has not moved. 2) Click top text and drag down about 100 pixels. Click again and drag up. Note that 'drag from' text taken from ui.originalPosition appears random. 3) Click top text and drag to right. Note that 'drag to' left coordinate is changing, taken from ui.position.left, even though object is not moving left or right.