Page long press paste copy disabled

Source: Internet
Author: User

Solution:

Directly in the CSS file to add the following code, you can implement the mobile phone-side Prohibit paste copy function:

*{    -webkit-touch-callout:none;  /* System default menu is disabled *    /-webkit-user-select:none;/*webkit browser *    /-khtml-user-select:none;/* Early browser *    /- moz-user-select:none;/* Firefox */    -ms-user-select:none;/*ie10*/    User-select:none;}

After adding this code, there will be a problem on iOS, this time you will find that the input box is unable to enter the content, the cause is-webkit-user-select:none; caused by this attribute.

The workaround is to set the properties of input in the CSS file as follows:

input {     -webkit-user-select:auto;/*webkit browser */}

In this way, if there is any wrong place please the great God, pointing out, learning from each other, progress with each other!

Page long press paste copy disabled

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.