External Keyboard Text Navigation Broken: Up Arrow

Originator:maxseelemann
Number:rdar://25824431 Date Originated:16-04-20
Status:Open Resolved:
Product:iOS Product Version:9.3.1
Classification:Serious Issue Reproducible:Always
 
Summary:
Using an external keyboard, the key command ↑ (up arrow) does not work in certain situations, when used a second time.

Steps to Reproduce:
Steps to Reproduce:
- Run the attached sample project on an iPad Simulator
- Tap into the UITextView on screen
- Place insertion point after "ullamco" (this is important)
- Ensure the External keyboard is connected
- Press ↑ (up arrow)
- Press ↑ (up arrow)


Expected Results:
On the first use of ↑ (up arrow), the cursor jumps to the end of the previous line. On the second invocation, the cursor should jump to the line above.

Actual Results:
On the first use of ↑ (up arrow), the cursor jumps to the end of the previous line. On the second invocation, however, the cursor does not move!

Version:
iOS 9.3.1

Notes:
This issue is always triggered when:

- In a paragraph that is being wrapped to multiple lines
- Placing the cursor in a line that's longer than the line above
- Moving the cursor using the up arrow to the end of the line

The counterpart command ↓ (down arrow) works correctly. There seems to be an issue in UITextInputTokenizer not returning correct positions.

Configuration:
Any iOS device

Attachments:
'textedit v2.zip' was successfully uploaded. http://cl.ly/fk4d

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!