thomas6188 0 Newbie Poster

was trying the drag and drop feature in html5. I have three blocks(boxA,B,C). Items are moved from box A to B or C. The problem is when i move items from A to B, Box A doesnt retain the object (instead of copying, it just moves the object). I have tried both 'move' and 'copy' value in 'dataTransfer.effectAllowed' property in the drag start event.

function dragStart(ev) {
ev.dataTransfer.effectAllowed='copy';

ev.dataTransfer.setData("Text", ev.target.getAttribute('id'));
ev.dataTransfer.setDragImage(ev.target,0,0);
return true;

}

What could be done to retain the object in the box?