Disable Chrome for Android text selection popup
Asked Answered
K

1

12

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?

enter image description here

Kristenkristi answered 20/2, 2017 at 5:10 Comment(0)
D
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>
Dichroic answered 20/2, 2017 at 5:18 Comment(3)
sorry about that, and i find this post , maybe you can to try that ? #3414183 Hope this help :)Dichroic
Thanks for the link but that was something else. Hope, will be able to resolve the same.Kristenkristi
This disables the text select. But there are situations where the user wants to select the text (inside a textarea), but the Android popup covers essential buttons of a toolbar, for instance. So the text needs to stay selectable.Titanothere

© 2022 - 2024 — McMap. All rights reserved.