Is there a way to reliably prevent webview text selection? (I'm testing this specifically on Android.)
I've seen advice (for iPhone) to use -webkit-user-select: none; for the CSS of (for instance) the body element, but that doesn't seem to do it for Android. I'm still able to select within the webview.
Unfortunately that causes some ugly crashing in this app.
2 Answers
please use this------->
webview.addEventListener('longpress', function(e) { alert("you can't select text...!"); });
use this----->
webview.addEventListener('longpress', function(e) { return false; });
webview.addEventListener('longclick', function(e) { return false; });
Your Answer
Think you can help? Login to answer this question!