Skip to content

Conversation

@matthew-carroll
Copy link
Contributor

Reverts a fix that was merged to correct a text input issue where leaving a Flutter app and coming back on Android puts Flutter's input system in an inconsistent state that won't allow reselecting the previously selected text field.

That fix introduced a number of regressions elsewhere. It is unclear why the regressions have occurred, so we are reverting.

For future reference, my current theory is this. On the engine side, we watch for Android closing the input connection so that we can forward that info to Flutter. When I implemented that behavior, I assumed that Android only closed connections when input is truly lost for a given input connection. However, based on carefully watching the Flutter gallery app for its phone number field, I think that what Android does is initially show a regular keyboard, and then Flutter tells Android to switch to a number keyboard, which, I think, causes Android to report the input connection is closed before re-opening the input connection with the new type of keyboard. This may be the root cause of the regression. Maybe the embedding's existing logic for opening an input connection is slightly wrong and needs to be updated.

@fluttergithubbot fluttergithubbot added the framework flutter/packages/flutter repository. See also f: labels. label Aug 29, 2019
Copy link
Contributor

@gspencergoog gspencergoog left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

32384589-a60f0e74-c078-11e7-9bc1-e5b5287aea9d

Copy link
Contributor

@HansMuller HansMuller left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

framework flutter/packages/flutter repository. See also f: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants