最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - Disable Chrome for Android text selection popup - Stack Overflow

programmeradmin3浏览0评论

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>

发布评论

评论列表(0)

  1. 暂无评论