Clicking inside canvas element selects text
Returning false
in an event stops the standard event from happening:
document.getElementById('canvas').onmousedown = function(){
return false;
};
Edit: I just found out that text selection is done before onclick
is fired, a better option is onmousedown
.