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?
+1
A:
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
.
Tatu Ulmanen
2010-01-12 09:25:15
I need to use the mousemove handler.... that is how I make the images drag.
Mark
2010-01-12 09:27:33
@Mark - so use it, and at the end of it, return `false`.
Dominic Rodger
2010-01-12 09:28:22
It worked in IE.... but not in firefox or chrome :S
Mark
2010-01-12 12:22:29
@Mark, edit your question and post the code you have so far, it's hard to help you if I have to guess what's wrong.
Tatu Ulmanen
2010-01-12 13:40:39