basically when I click on a word twice in the browser, the word is selected. If three times, whole paragraph is selected. Now, if I have a canvas, and I click on it twice a text below of it will be selected. How can I block this in JavaScript? I mean to not select the text when I click on canvas.
Asked
Active
Viewed 64 times
1 Answers
3
Use CSS:
canvas {
-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}

Aurel Bílý
- 7,068
- 1
- 21
- 34