I’m doing a drag and drop and when the draggable object passes certain limits that I have set to the screen I want to return it to its original position.
My problem is that if the onmousedown event is active the object don’t return to its original position until onmouseup event is called.
Is it possible to cancel or stop mousedown while it’s running?
You can clear the mousemove event when a specific condition is met:
Demo (JSLint)