I have a function that I run when the user selects a word in the textarea (typically by double clicking it). It works great on the PC. On android devices, long clicking a word selects it, but doesn't fire onselect.
Is there any way to fix it? Or perhaps some work around to select a word on normal click?
Here's the line in the cshtml
<textarea class="all_txt" id="all_txt" onselect="wordSelected(this, @loggedIn)"></textarea>
And here's the javascript function
function wordSelected(txt, loggedIn) {
var selected = txt.value.substring(txt.selectionStart, txt.selectionEnd);
var substring = selected.trim();
start = selected.search(substring) + txt.selectionStart;
end = start + substring.length;
...
}