Opened 12 years ago
Last modified 10 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 12 years ago by
comment:2 Changed 10 years ago by
Milestone: | 1.9.0 → 2.0.0 |
---|
comment:5 Changed 10 years ago by
Status: | new → open |
---|
comment:7 Changed 10 years ago by
Resolution: | duplicate |
---|---|
Status: | closed → reopened |
Summary: | Sortable, cancel on start in some cases → Sortable: Allow cancel method to be called in start event |
Type: | bug → feature |
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.
The documentation states of the
cancel
method: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.