Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-10436] iOS: Textfield gives incorrect values with autocorrect enabled

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionCannot Reproduce
Resolution Date2013-04-09T10:52:35.000+0000
Affected Version/sRelease 2.1.1
Fix Version/sRelease 3.0.2
ComponentsiOS
Labelsapi
ReporterFokke Zandbergen
AssigneeShameer Jan
Created2012-08-06T00:01:22.000+0000
Updated2017-03-21T22:16:28.000+0000

Description

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.

Attachments

FileDateSize
app_3.js2012-08-07T23:52:51.000+0000630
app.js2012-08-06T00:30:12.000+0000667
app.js2012-08-06T00:04:45.000+0000268

Comments

  1. Fokke Zandbergen 2012-08-06

    Use the newest (first) app.js
  2. Fokke Zandbergen 2012-08-08

    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.
  3. Shameer Jan 2013-04-09

    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
  4. Lee Morris 2017-03-21

    Closing ticket as the issue cannot be reproduced and due to the above comments.

JSON Source