Opened 8 years ago

Last modified 6 years ago

#6954 reopened feature

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/

Change History (7)

comment:1 Changed 8 years ago by rs

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.

comment:2 Changed 6 years ago by Scott González

Milestone: 1.9.02.0.0

comment:3 Changed 6 years ago by petersendidit

#8432 is a duplicate of this ticket.

comment:4 Changed 6 years ago by petersendidit

#7640 is a duplicate of this ticket.

comment:5 Changed 6 years ago by petersendidit

Status: newopen

comment:6 Changed 6 years ago by petersendidit

Resolution: duplicate
Status: openclosed

Duplicate of #4904.

comment:7 Changed 6 years ago by tj.vantoll

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.

Note: See TracTickets for help on using tickets.