Caret disappears on return

Originator:jbernal
Number:rdar://29085539 Date Originated:2016-11-03
Status:Open Resolved:
Product:iOS SDK Product Version:10.1
Classification:UI/Usability Reproducible:Always
 
Summary:
When you have a UITextView and a block of attributed text that has a background and both indent and spacing in its paragraph style, typing return at the end of a line makes the caret disappear, until you start typing or change selection.

Steps to Reproduce:
1. Use the attached sample project, or set the text view’s attributtedText to a string with a background color, and a paragraph style with spacing and indent.
2. Move the cursor to the end of any line.
3. Type return

Expected Results:
The caret should be visible

Actual Results:
The caret disappears until you type or move the cursor. Deleting the newline also makes the caret disappear. Depending on the specific attributes, the caret may be partially seen blinking *behind* the background color.

Notes:
Provide additional information, such as references to related problems, workarounds and relevant attachments.

Comments

Sample project can be downloaded from https://cloudup.com/czpfEd6sT4S


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!