You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We've recently been informed that the order in which we trigger IMM callbacks is different from standard Android text fields.
Specifically, somehow we're triggering InputMethodManager#onShowInputRequested()afterIMM#onUpdateSelection(), when normally the flow is onShowInputRequested -> onUpdateSelection.
We should debug and confirm this ourselves. It's not immediately obvious to me how we're triggering either of those callbacks, but there's likely call sites in TextInputPlugin.java (IMM#updateSelection, IMM#showSoftInput).
This does seem very likely to be root cause of all the samsung bugs we are seeing. It looks like the field is being updated before the keyboard is shown, which prevents the update reaching the keyboard, thus causing the keyboard to treat the field as empty and inserting the duplicate text.
Reacted by Michael Klimushyn, seritaApp, Robert Ende, Justin McCandless and Per Lycke
I have attempted to call the show keyboard method before the update editing state, but it does not seem to have an effect on any of the Samsung keyboard bugs.
Specifically, I have tried ensuring editable_text.dart_openInputConnection() calls _textInputConnection.show() before _textInputConnection.setEditingState() but it has no impact.
#43865 should reorder the calls. The bugs that this attempts to fix are still present, but this specific one should be resolved. We should look for alternative leads to fixing the relevant bugs.
I'm going to close this issue, but the remaining related issues are tracked in #42273 and b/141639086
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.
Activity
GaryQian commentedon Oct 8, 2019
This does seem very likely to be root cause of all the samsung bugs we are seeing. It looks like the field is being updated before the keyboard is shown, which prevents the update reaching the keyboard, thus causing the keyboard to treat the field as empty and inserting the duplicate text.
GaryQian commentedon Oct 16, 2019
b/141639086 for reference
GaryQian commentedon Oct 30, 2019
I have attempted to call the show keyboard method before the update editing state, but it does not seem to have an effect on any of the Samsung keyboard bugs.
GaryQian commentedon Oct 30, 2019
Specifically, I have tried ensuring
editable_text.dart_openInputConnection()calls_textInputConnection.show()before_textInputConnection.setEditingState()but it has no impact.GaryQian commentedon Nov 6, 2019
#43865 should reorder the calls. The bugs that this attempts to fix are still present, but this specific one should be resolved. We should look for alternative leads to fixing the relevant bugs.
I'm going to close this issue, but the remaining related issues are tracked in #42273 and b/141639086
github-actions commentedon Aug 26, 2021
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of
flutter doctor -vand a minimal reproduction of the issue.