Thus, the problem was caused by a combination of the property: cursorAt , which I specifically assigned, which moves the helper to another location from the cursor, and the default setting is “tolerance” to droppable, which is the “Intersection” parameter.
If the Tolerance parameter is set to Intersection, it expects the dragging assistant to cross at least 50% of the container with the option to delete. And since I compensated for my assistant, he rarely overlapped correctly.
Changing the tolerance to the "pointer" forces it to accept only the pointer as a draggable target.
var taskSelected = $("#tablecontainer tr.selected").length; $("#tablecontainer tr.selected").draggable({ cursor: "move", cursorAt: { top:-12, left: -20 }, helper: function(event) { return $("<div class='ui-widget-header'>" + taskSelected + " Tasks selected.</div>"); } }); $(".featureOrgDataWrapper .droppable").droppable({ activeClass: "ui-state-highlight" , tolerance: "pointer" , drop: function (event, ui) { alert("success"); } });
Working versions: # 1 and # 2
source share