Why is clientX reset to 0 on last drag-event and how to solve it? Why is clientX reset to 0 on last drag-event and how to solve it? javascript javascript

Why is clientX reset to 0 on last drag-event and how to solve it?


By default, data/elements cannot be dropped in other elements. To allow a drop, you must prevent the default handling of the element when dragover.

document.addEventListener("dragover", function(event) {  // prevent default to allow drop  event.preventDefault();}, false);