Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Conversation

@matthew-carroll
Copy link
Contributor

This reverts commit 4003fbc.

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.

Copy link

@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

@matthew-carroll matthew-carroll merged commit dce8a34 into flutter:master Aug 29, 2019
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Aug 30, 2019
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Aug 30, 2019
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Aug 30, 2019
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Aug 30, 2019
GaryQian pushed a commit to flutter/flutter that referenced this pull request Aug 31, 2019
* 37c5510 Roll src/third_party/skia ca8b07cf8a59..3783375c4d41 (2 commits) (flutter/engine#11712)

* 74a3c73 Roll src/third_party/dart 35382f9b14..05c28c6115 (flutter/engine#11702)

* 7024722 Android 10+ View.setSystemGestureExclusionRects (flutter/engine#11441)

* 101e03c Return a JSON value for the Skia channel (flutter/engine#11717)

* dce8a34 Revert "Notify framework to clear input connection when app is backgrounded (#35054) (#9498)" (flutter/engine#11720)

* 1b1f781 Quote the font family name whenever setting the font-family property. (flutter/engine#11722)

* 260f88d Roll src/third_party/skia 3783375c4d41..165ca3f85b7a (8 commits) (flutter/engine#11725)

* e620012 Roll src/third_party/dart 05c28c6115..1573f4e877 (14 commits)

* 81e010f last flutter web sync: cc38319841 (flutter/engine#11732)

* 1235439 Roll src/third_party/dart 1573f4e877..fd48ea3432 (16 commits)

* cf5d2a6 Add wasm to sky_engine (flutter/engine#11736)

* 118b5f3 Roll src/third_party/dart fd48ea3432..a873bc5db3 (7 commits)

* a7d59aa Roll src/third_party/skia 165ca3f85b7a..ba0a2c7ad992 (1 commits) (flutter/engine#11745)

* 8401ce9 Roll src/third_party/dart a873bc5db3..35df96a2e2 (1 commits)

* ff3dffa Roll src/third_party/skia ba0a2c7ad992..7409b73fa546 (3 commits) (flutter/engine#11756)

* 70626c0 Roll src/third_party/skia 7409b73fa546..575699569e91 (1 commits) (flutter/engine#11766)

* 292d844 Roll src/third_party/dart 35df96a2e2..d4342b9021 (4 commits)
@HansMuller
Copy link

Issue flutter/flutter#39738 demonstrates a failure mode that doesn't involve the numeric keyboard. Note also that when TextEditingController.clear() is called the following messages appear on the console:

W/IInputConnectionWrapper( 1893): getTextBeforeCursor on inactive InputConnection
W/IInputConnectionWrapper( 1893): getSelectedText on inactive InputConnection
W/IInputConnectionWrapper( 1893): getTextAfterCursor on inactive InputConnection

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants