Highlighted

Auto-correct Oddities

Engaged ,
Mar 08, 2019

Copy link to clipboard

Copied

Hi all.  I have noticed that when using a textInput on iOS, if I misspell a word and auto-correct corrects the spelling and I save myTextInput.text to a database, the value that gets saved is the original misspelling.  It is as if the auto-corrected value, although displayed in the textInput, never actually gets comitted to the text property of the textInput.

Has anyone else experienced this?  It is only by pure chance that I stumbled across this, as none of us would actually check our database to see if a word actually got stored the way it was spelled.

TOPICS
Development

Views

359

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

Auto-correct Oddities

Engaged ,
Mar 08, 2019

Copy link to clipboard

Copied

Hi all.  I have noticed that when using a textInput on iOS, if I misspell a word and auto-correct corrects the spelling and I save myTextInput.text to a database, the value that gets saved is the original misspelling.  It is as if the auto-corrected value, although displayed in the textInput, never actually gets comitted to the text property of the textInput.

Has anyone else experienced this?  It is only by pure chance that I stumbled across this, as none of us would actually check our database to see if a word actually got stored the way it was spelled.

TOPICS
Development

Views

360

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Mar 08, 2019 0
Advocate ,
Mar 11, 2019

Copy link to clipboard

Copied

No one knows how and when exactly you are reading the data from the textfield to put it into your database, so that does not make a good minimal example.

Try creating a small test to see what the .text property will give you on certain timings / events. I would guess that you are reading the .text property too early, before the auto-correct changes are applied to the Air textfield. Maybe wait for focus out first?

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Mar 11, 2019 0
Engaged ,
Mar 11, 2019

Copy link to clipboard

Copied

I suppose that I could take the time to make a test, but I am not doing anything so quickly that it would likely require this type of test because I am acting quicker than an event might happen.  I basically have a Sign Up page in my app where a user can enter their email address, first name, last name, phone number, city, etc., etc.  When they are done filling in all the fields, they then enter credit card information, accept our terms and conditions.  So plenty of time has passed for all textInput events to occur. If Auto-correct corrects any of the textInput data, the data that is then written to the database is what they originally typed, not the auto-corrected value.  It is as if the auto-corrected value never actually gets committed to the textInput.text field.  So far, I have only tested this on iOS. I think it is likely a bug.  I just don't know where to post the bug anymore.  Do I do it with the Flex team over at Apache, or the AIR team here at Adobe???

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Mar 11, 2019 0