Problem description
When using an textfield with iOS autocorrect, you'll sometimes get unexpected values.
Steps to reproduce
1. Execute the code in app_3.js on a device
2. Type the beginning of a device-known long word (Dutch: Amst)
3. When the suggestion (Dutch: Amsterdam) appears hit the soft keyboard return button
4. Check the console
The results are not always the same, bot mostly one of these.
[INFO] RETURN
[INFO] e.value: Amst
[INFO] e.source.getValue(): Amsterdam
[INFO] t.getValue(): Amsterdam
[INFO] RETURN
[INFO] e.value: Amst
[INFO] e.source.getValue(): Amst
[INFO] t.getValue(): Amst
[INFO] RETURN
[INFO] e.value: Amst
[INFO] e.source.getValue(): Amst
[INFO] t.getValue(): AmstAmsterdam
Another example:
1. Execute the code in app_3.js on a device
2. Type the beginning of a device-known long word (Dutch: Amst)
3. When the suggestion (Dutch: Amsterdam) appears hit the soft keyboard space bar to complete it
4. Hit backspace to delete the space iOS automatically added after the word
5. Hit the submit button
6. Check the console
The results are not always the same, bot mostly:
[INFO] CLICK
[INFO] t.getValue(): AmsterdamAmsterdam
Expected results
value and getValue() should return the correct word.
Use the newest (first) app.js
The return-event bug can be workaround bij delaying the execution of code where you retrieve the value. The spacebar bug can be workaround by checking if the second half of the value equals the first half en then substr either one.
Issue does not reproduces Tested with Titanium Studio, build: 3.0.1.201212181159 Titanium SDK version: 3.1.0 Titanium SDK version: 3.0.2 iOS iPhone Simulator: iOS SDK version:5.1, 6.0
Closing ticket as the issue cannot be reproduced and due to the above comments.