Reputation: 5653
I have made a script that allows users to drag images around. Unfortunatly though most browsers higlight the image blue. Is there a way to disable this behaviour in all browsers?
Upvotes: 1
Views: 698
Reputation: 124828
Return false from your mousedown/mousemove handler to prevent default browser actions (default action is the select the underlying element on mousedrag).
EDIT
What I meant was this:
document.onmousemove = function() {
// Do your stuff
return false;
}
You might have different looking functions, but in the end, put return false
.
Upvotes: 1