JavaScript – Disable chrome text selection pop-up
•
Android
I want to hide the chrome text selection pop-up window, that is, if the user selects any text, the default text option pop-up window (attached screenshot) should not be displayed
Is it possible to use JavaScript without deleting the entire text selection function?
resolvent:
You can use CSS like this. Try:)
user-select: none;
.disable-selection{
-moz-user-select:none;
-ms-user-select:none;
-webkit-user-select:none;
}
<p class="disable-selection">can't select this</p>
<p>can select this</p>
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
二维码