Allow contenteditable Selection Style in Non-Editable Content

Originator:davidmikaelweiss
Number:rdar://14954817 Date Originated:10 Sep 2013
Status:Open Resolved:
Product:iOS SDK Product Version:All
Classification:Enhancement Reproducible:Always
 
Summary:
We are using a UIWebView to render our content. (We love not having to write our own rendering engine! Thank you!) We allow the user to select content and then "mark it" with a highlight, underline, etc. Many times they want to highlight midway through one paragraph to midway through the following paragraph. The default selection mode for UIWebView on iOS makes this impossible.

When the user selects text in Mobile Safari or a UIWebView in a non-editable content, crossing a block boundary causes the selection to be changed to a block-by-block selection mode. When the user selects text in content with the contenteditable attribute, selection can be changed character-by-character, even when crossing block boundaries. We need a way for the user to select text character-by-character, even after crossing block boundaries, without having made the content editable.

Steps to Reproduce:
1. Open http://jsfiddle.net/MQEb8/1/ in Mobile Safari.
2. Attempt to select the text starting at "Not Editable 1" and ending at "Not" in the following paragraph, a selection consisting of 5 words.

Expected Results:
You can perform the desired selection.

Actual Results:
There is no way to select partial blocks when crossing a block boundary. You can only select entire paragraphs.

Version:
This happens on all iOS versions.

Notes:
We need this for an annotation system in an app that uses UIWebView to present content. The user can select text, then apply a highlight. Because of this text selection limitation, the user cannot perform precise highlights. The desired behavior is available in iBooks, but iBooks is using a private API to achieve the desired result.

We are blocked because of this issue. There is no workaround available.

Configuration:
This happens on all configurations.

Attachments:

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!