Using jQuery UI, I have a foo div that is both draggable and droppable, and a div bar that is only droppable. Drag and drop occurs when the helper: 'clone' option is turned on, so the original foo does not actually move. When I throw a cloned foo on top of the original foo , drop: function not called.
This seems odd because it works when I throw a cloned foo to bar . It also works to drop other draggables on foo . The only problem is that I cannot throw foo to myself.
I just said foo and bar and dragged and dropped so many times that even I am confused, but this example should clarify the situation:
http://jsfiddle.net/5KATZ/
If you try to drag the first square onto the second or third, it will work. But if, instead of dropping it onto the second block, you start dragging it and then trying to drop it onto yourself, nothing happens. If so, how it should work, then what am I doing wrong? If this is a bug in the jQuery user interface, can you think of any good workarounds?
source share