August 20, 2009

Turning off copy-paste in a UIWebView

Posted in iPhone development tagged , , , , at 6:02 am by tetontech

This defect is now fixed.  To turn off copy-paste for both mobile Safari and the UIWebView put webkit-user-select:none; in the CSS class of the body.  To turn it on use webkit-user-select:none;

Or if you are using QuickConnect you can call copyPaste(false); to turn it off and copyPaste(true)to turn it on.

It looks like the latest version of iPhone OS 3.0 no longer allows you to use webkit-user-select:none; to turn off copy-paste.  This is unfortunate.  Hopefully this is only a defect.  Granted, I have only tried this on the Simulator at this point, but it used to work there.

I have submitted this as a bug to apple (Bug ID# 7164604).

Advertisements

2 Comments »

  1. Egor Egorov said,

    And what did they replied? Unfortunately, I cannot see the bugreport, seems like radar is not allowed to see other people’s bugreports.

    • tetontech said,

      No response yet.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: