When we double click on single word then browser select that word, when we triple click on single word then browser select that whole single line or whole paragraph.
Here, I want to prevent selecting all words on triple click and change to select only single word
I tried with this code
function clearSelection() {
if(document.selection && document.selection.empty) {
document.selection.empty();
} else if(window.getSelection) {
var sel = window.getSelection();
sel.removeAllRanges();
}
}