Spaces ignored at the end of editable UITextViews

Originator:drodrigueztroitino
Number:rdar://11122334 Date Originated:26-Mar-2012 10:51 PM
Status:Open Resolved:
Product:iPhone SDK Product Version:5.1
Classification:Serious Bug Reproducible:Always
 
Summary:
Spaces typed at the end of the lines of UITextViews when there is no more room for more characters are ignored after typing another letter.

Steps to Reproduce:
1. I tested the behaviour both in my own application and Notes.app. For this STR you can use Notes.app.
2. Type the following text: “Wthhojxeyvcyisechidciudxboxfghvdu”. If I copied it correctly, this should leave you at the end of the line in portrait mode for an iPhone 4 with iOS 5.1 in Notes.app. Many other strings works, you just have to type on that leaves no room for a new whitespace.
3. Type a whitespace with the space bar. The caret should stay in the first line, and no visual space should be added. No problem there.
4. Type any character, like for example “a”.
5. Rotate the iPhone to portrait mode.

Expected Results:
There should be a space between the first line text and the typed character.

Actual Results:
There is no space between the first line text and the typed character, is one big line.

Regression:

Notes:
I have been able to reproduce this behaviour with an iPhone 4 with iOS 5.1, and iPhone 4 with 5.0.1 and an iPhone 3G with 4.2.1. Also reproducible in the iOS Simulator 4.3.2, 5.0 and 5.1 (using my application and the Contacts.app notes field).

The number of spaces seems not to matter, if one disables the shortcut for “. ” preference, one can type more than one space, that they will not appear when the phone is rotated.

Tested both in Spanish localization and English (US) localization.

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!