jQuery UI sortable('cancel') - this.helper is null
- by Kerry
I am trying to disable a sortable element from sorting when it has been double clicked. When I try to disable it, even without a condition, it gives me the error 'this.helper is null'.
$('.roundedBox:first', division).sortable({
start: function( event, ui ) {
if( true === true ) {
$(this).sortable('cancel');
}
$(this).parent().data( 'sorting', true );
},
stop: function() {
$(this).parent().data( 'sorting', false );
},
items: '.department',
update: function() {},
placeholder: 'department-placeholder'
})
Any ideas on how I can do this? I don't need it to be this method. Literally anything thing that stops it will work.
The problem is, sorting starts on a single click, but I have another action bound to double click. If it's double clicked, I don't want it to drag.