Skip to main content

Search and Top Navigation

#6954 reopened feature ()

Opened February 08, 2011 04:24PM UTC

Last modified March 04, 2013 06:13PM UTC

Sortable: Allow cancel method to be called in start event

Reported by: macku Owned by:
Priority: minor Milestone: 2.0.0
Component: ui.sortable Version: 1.8.9
Keywords: Cc:
Blocked by: Blocking:
Description

Cancelling sortable on start callback throws error:

"this.helper is null"

Function: _cacheHelperProportions

Example: http://jsfiddle.net/9Ke8q/1/

Attachments (0)
Change History (7)

Changed June 02, 2011 08:33AM UTC by rs comment:1

The documentation states of the cancel method:

Useful in the stop and receive callback functions.

but it does not say that the method would not work in other event handlers, which is clearly the case. So at least the documentation should be updated…

But I, too, think this feature could be very useful: not allowing the drag in the first place. This could also be solved by allowing the cancel option to be a function, calculating the “draggability” of an object on demand.

Changed October 11, 2012 02:54PM UTC by scottgonzalez comment:2

milestone: 1.9.02.0.0

Changed October 25, 2012 01:33AM UTC by petersendidit comment:3

#8432 is a duplicate of this ticket.

Changed October 25, 2012 01:36AM UTC by petersendidit comment:4

#7640 is a duplicate of this ticket.

Changed October 25, 2012 01:37AM UTC by petersendidit comment:5

status: newopen

Changed October 25, 2012 01:38AM UTC by petersendidit comment:6

resolution: → duplicate
status: openclosed

Duplicate of #4904.

Changed March 04, 2013 06:13PM UTC by tj.vantoll comment:7

resolution: duplicate
status: closedreopened
summary: Sortable, cancel on start in some casesSortable: Allow cancel method to be called in start event
type: bugfeature

This is not a duplicate of #4904 because that has to do with items being dropped and this is asking that calling the cancel method within the start method to work. Here's a test case against master that shows this is an issue - http://jsfiddle.net/tj_vantoll/2ZSpu/.

This should be reconsidered for the rewrite.