Search and Top Navigation
#5863 closed bug (notabug)
Opened July 26, 2010 06:32PM UTC
Closed July 26, 2010 10:37PM UTC
Last modified October 11, 2012 09:15PM UTC
Odd behavior when calling cancel in sortable's start event
Reported by: | pboyd | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | |
Component: | ui.sortable | Version: | 1.8.2 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
I was trying to prevent a list item from being moved, so I called cancel() inside the start event, like this:
$("ol").sortable({ start: function(event, ui) { if (ui.item.hasClass('nodrag')) { $(this).cancel(); } } });
This keeps the item from being moved, but a large number of list items are inserted below the item that the user tries to move. In the attached HTML file, try moving the second item you'll see what I mean.
I get this behavior in Firefox 3.6 and Chrome (haven't tried any other browsers).
Err... this was just me being stupid.. my apologies.
should have been:
(Which then fails for some other reason, but that's probably me mis-using start).
Sorry for the spam, please disregard this ticket.