Giving specific HTML and CSS to a UIActivityViewController can break autocorrect

Originator:robotspacer
Number:rdar://19674173 Date Originated:31-Jan-2015 01:29 AM
Status:Open Resolved:
Product:iOS SDK Product Version:iOS 8.2 (12D5461b), and various other iOS 8 versions
Classification:Other Bug Reproducible:Always
 
Summary:
Super weird bug. Someone noticed this in my app Deliveries: tap Share, tap Mail, then type some text into the HTML template the app supplies. If you mistype a word, autocorrect will change it, but then add an extra letter in front. If there is any text after, then it will also eat the first character. So it seems like it's basically inserting the corrected text using the wrong character offset.

Steps to Reproduce:
1. Run the attached sample app. All it does is load an HTML file and give it to UIActivityViewController, then present it. The specific CSS used is what triggers the bug.
2. Tap Mail when the share sheet appears.
3. Tap in the body of the message.
4. Type "whem" (or some other word that is not spelled correctly)

Expected Results:
"whem" should be changed to "when".

Actual Results:
"whem" becomes "wwhen", and the character immediately after the insertion point is removed.

Version:
iOS 8.2 (12D5461b), Xcode 6.2 (6C107a).

Notes:
The really weird part of this bug is the workaround: in Email.html, just remove the width and from the a.icon CSS class. This doesn't even affect the way the text is laid out.

The bug is also present on iOS 8.1.2 and 8.1.3, not sure about earlier versions.

Configuration:
iPod touch 5th generation, 32GB. Also tested on iPhone 6.

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!