webview no selection/copy&paste
hi everyone.
Is it possible to disable the possibility to select text in the webview where you can copy the selected text without disabling the scrolling on iPhone?
I found no solution.
Thanks
3 Answers
-
Accepted Answer
yes, in the html of the page you need use CSS for the element( let's say body) you want not to be selectable
-webkit-user-select: none;
-
use this—–>
webview.addEventListener('longpress', function(e) {
return false;
});webview.addEventListener('longclick', function(e) {
return false;
}); -
please use this —>
webview.addEventListener('longpress', function(e) {
alert("you can't select text…!");
});