When adding onmousedown and onmouseup events to a div I am noticing that it seems by default if I do not click outside the div and attempt to drag over it again with the mouse, the browser automatically picks up the div as if by some default drag and drop thing. What is this and is there some way to prevent this?
I am using Firefox, HTML5, and again I notice the issue when adding mousedown events to an empty (not sure if the same thing would happen on a populated div). The cursor turns into a closed hand and the browser automatically drags a faded copy of the div.
Edit: I found an exact duplicate and prevented the issue by using
event.preventDefault ? event.preventDefault() : event.returnValue = false;