I'm trying to disable select using mouse down using the following code
var unFocus = function () {
if (document.selection) {
document.selection.empty()
} else {
window.getSelection().removeAllRanges()
}
}
document.getElementById("v_6").onmousemove = function () {
unFocus()
}
document.getElementById("v_6").onmousedown = function () {
unFocus()
}
My main issue is that I would like to have the code for onmousedown & onmousemove at the same time. so right now if I move the mouse without selecting the with onmousedown it removes the curser but I don't want that to happen. I would like to have it that if both events happen at the same time then it execute the function. Any help with that would be much appreciated