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 comment:1
Changed October 11, 2012 02:54PM UTC by comment:2
milestone: | 1.9.0 → 2.0.0 |
---|
Changed October 25, 2012 01:37AM UTC by comment:5
status: | new → open |
---|
Changed October 25, 2012 01:38AM UTC by comment:6
resolution: | → duplicate |
---|---|
status: | open → closed |
Duplicate of #4904.
Changed March 04, 2013 06:13PM UTC by comment:7
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.
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.