I'm having a problem with sortable, draggable item when I drop it on a trash can object.
The code is in this jsfiddle. http://jsfiddle.net/queeg/sRAmW/1/
It's really easy to reproduce the issue in the jsfiddle:
drag "bread" to sortableA" The "sortableA" box expands to allow the item to fit.
drag "bread" to "Trash can" The trash can will expand to accept the item, then the item fades away.
drag "bread" from "sortableA" to the "Trash can" The problem will show itself. The trash can does NOT expand and the item jumps to some other location before it fades out.
A possible solution would be to remove the position: absolute
from the draggable when dropped onto the trash can:
var element = ui.draggable.css('position', '');
DEMO
When coming from the #sortableX
elements, they have this css rule applied, but not coming directly from one of the two lists.
Calling $('#sortable, #sortable2').droppable();
seems to do the trick. See here.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With