Reputation: 43
I have some div with onclick event. After clicks in this element text from inside gets mark (selection). https://i.sstatic.net/TNyAl.jpg https://i.sstatic.net/baB0E.jpg How can I remove this?
Upvotes: 0
Views: 36
Reputation: 1263
This is easily solvable with CSS:
.noselect {
-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
Then add the noselect
class to the elements you don't want to be selectable.
Upvotes: 2