Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#8669 closed bug (notabug)

Sortable: 'out' callback triggered on dropping item

Reported by: nc Owned by: mikesherov
Priority: minor Milestone: 1.10.0
Component: ui.sortable Version: 1.8.23
Keywords: Cc:
Blocked by: Blocking:

Description

http://jsfiddle.net/drewP/m7VJq/1/

Add the following line to the 'out' callback function:

alert('out');

Run the change. Click-drag-release one of the list items, dragging only a few pixels. The out callback seems to be getting called on the release (after the beforeStop).

Tried and occurs with jQuery UI 1.8.23, 1.8.18, 1.8.16 on FireFox 15.0.1 and IE 8 on Windows 7.

Change History (5)

comment:1 Changed 10 years ago by petersendidit

Status: newopen
Summary: Sortable 'out' callback triggered on dropping item after dragging only a few pixelsSortable: 'out' callback triggered on dropping item

http://jsfiddle.net/petersendidit/m7VJq/13/

Looks like out is getting triggered on every drop.

comment:2 Changed 10 years ago by mikesherov

Owner: set to mikesherov
Status: openassigned

http://jsfiddle.net/fPMXB/ confirmed on latest too.

comment:3 Changed 10 years ago by mikesherov

Resolution: notabug
Status: assignedclosed

Thanks for contributing! Unfortunately, this is actually intended behavior, but the docs are unclear on this point. I'll go ahead and update the docs to clarify this point. If you need to do something only on over events that aren't on drops, you can use the "beforeStop" event to prevent an action on the subsequent "out" event.

comment:4 Changed 10 years ago by mikesherov

Documentation issue documented here: https://github.com/jquery/api.jqueryui.com/issues/69

comment:5 Changed 10 years ago by tj.vantoll

#5890 is a duplicate of this ticket.

Note: See TracTickets for help on using tickets.