admin管理员组

文章数量:1425752

I want to hide the Chrome for Android text selection popup that is shown if the user selects any text, such that the default text option popup (attached screenshot) does not appear.

Is there anyway to do so using javascript, without removing the text-selection feature as a whole?

I want to hide the Chrome for Android text selection popup that is shown if the user selects any text, such that the default text option popup (attached screenshot) does not appear.

Is there anyway to do so using javascript, without removing the text-selection feature as a whole?

Share Improve this question edited Apr 11, 2020 at 15:23 Neil 7051 gold badge11 silver badges27 bronze badges asked Feb 20, 2017 at 5:10 Shivam TyagiShivam Tyagi 1682 silver badges12 bronze badges 0
Add a ment  | 

1 Answer 1

Reset to default 3

you can use css , like this , try it :)

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>

本文标签: javascriptDisable Chrome for Android text selection popupStack Overflow