javascript - Mobile terminal development H5 page cannot be implemented on iOS mobile phones. Long press to copy text. Looking for a solution?
ringa_lee
ringa_lee 2017-05-16 13:29:16
0
1
646

Mobile terminal development H5 page cannot realize long press to copy text on iOS mobile phone
The answer from Baidu Google search is that the iOS mobile phone system comes with a setting that needs to be disabled. Our requirement is to implement this function, but I did not implement it when testing on the mobile phone. Long pressing and copying text can be done with this setting before, but this time it cannot be done

Need to copy the WeChat ID in the lower right corner. In addition, I can set the attributes of the submit button to achieve it. Please let me know.

    p.dctxixi{
        float:right;
            padding: 0 0.3rem 0;
          line-height: 1.2rem;
          height:1.2rem;
          width:4rem;
          border:none;
          -webkit-touch-callout:inherit;
        -webkit-user-select:text !important;
            user-select: text;
             -khtml-user-select: text;
             -moz-user-select: text;
            -ms-user-select: text;
    }
}

ringa_lee
ringa_lee

ringa_lee

reply all(1)
漂亮男人

Your copy function needs to use the system's clipboard, but the clipboard cannot be called on the mobile phone, so this function cannot be used.
This function only prompts users to copy the information themselves.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template