multiselect icon indicating copy to clipboard operation
multiselect copied to clipboard

Item disappears when start dragging from the right but immediatly drop it (within the available pane)

Open michael opened this issue 16 years ago • 6 comments

michael avatar Jun 22 '09 18:06 michael

I noticed that too. I fixed it by changing: } else if (!opts[side].sortable) {

to: } else if (!opts[side].sortable && side !== 'available') {

Not sure if that is the best way, but it works ;)

ericmmartin avatar Nov 03 '09 22:11 ericmmartin

I found another method to fix that. I commented out the line ui.draggable.hide(); and it seems to work fine.

gnlyn avatar Feb 10 '10 17:02 gnlyn

yes, we worked hard to make droppable and sortable work... we will take a look at this as soon as we can. For now, these fix may work, but you should also test all combinaisons of options ("droppable" and "sortable") to make sure it works for all use cases. If we can't fix this, we will simply limit the number of combinaisons for the most common use cases. You are welcome to help! :)

yanickrochon avatar Apr 20 '10 13:04 yanickrochon

Making the fixes above i noticed that the 'revert' effect disapear too, so i modified the code below, adding the value 'valid' to revert property:

// make draggable elements.each(function() { $(this).parent().draggable({ connectToSortable: that.selectedList, helper: _dragHelper, appendTo: that.container, containment: that.container, revert: 'valid' }); });

arpego avatar Jan 05 '11 23:01 arpego

Any update on this?

SimonCropp avatar Apr 19 '11 03:04 SimonCropp

I fixed it by checking the class of the parent. I really wanted to figure out how to get it to use a revert animation, but I think you'd need that logic to be in the draggable and I wasn't sure how to handle a drop event from within the dragable context, so I just gave up. I'd love to see an implementation of this that got the revert animation in there, too.

// received an item from a sortable to a droppable } else if (!opts[side].sortable) { if (ui.draggable.parent().hasClass(side)) { return false; } else { setTimeout(function(){ ui.draggable.hide(); that._setSelected(ui.draggable, itemSelected); }, 10); } }

8riaN avatar Jan 28 '12 00:01 8riaN