Skip to content

Race between autocorrect and textcontroller.clear on iOS #10126

@goderbauer

Description

@goderbauer

In the friendlychat app there is a racecondition on iOS between clearing the text field and inserting the autocomplete suggestion when hitting send. To reproduce:

  1. Load https://github.com/flutter/friendlychat-flutter/blob/master/full_steps/step_2_sign_in/lib/main.dart#L166 onto a phone
  2. enter text in the text field that iOS wants to autocorrect
  3. hit send

The original text will get send, the autocorrected text ends up in the text field even though it should have been cleared: https://github.com/flutter/friendlychat-flutter/blob/master/full_steps/step_2_sign_in/lib/main.dart#L166

In addition to that, after this happened, there is still a cursor in the text field suggesting that I can continue typing. However, all keystrokes are ignored until i click in the text field again.

/cc @cbracken

Metadata

Metadata

Assignees

Labels

a: text inputEntering text in a text field or keyboard related problemsplatform-iosiOS applications specifically

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions