search

Home  >  Q&A  >  body text

javascript - Mobile terminal development H5 page cannot be implemented on iOS mobile phones. Long press to copy text. Looking for a solution?

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_leeringa_lee2754 days ago607

reply all(1)I'll reply

  • 漂亮男人

    漂亮男人2017-05-16 13:31:16

    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.

    reply
    0
  • Cancelreply