-
Notifications
You must be signed in to change notification settings - Fork 5.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Android] Fix TextInputType.none for devices with physical keyboard #49980
[Android] Fix TextInputType.none for devices with physical keyboard #49980
Conversation
shell/platform/android/test/io/flutter/plugin/editing/TextInputPluginTest.java
Show resolved
Hide resolved
shell/platform/android/io/flutter/plugin/editing/TextInputPlugin.java
Outdated
Show resolved
Hide resolved
shell/platform/android/test/io/flutter/plugin/editing/TextInputPluginTest.java
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The change makes sense to me, modulo comments from other reviewers. Thanks for looking into this!
@LongCatIsLooong @reidbaker is the |
No it is not normally flakey for me but I think the issue might be flutter/flutter#138197 |
Much cleaner after the refactor |
shell/platform/android/test/io/flutter/plugin/editing/TextInputPluginTest.java
Show resolved
Hide resolved
auto label is removed for flutter/engine/49980, due to - The status or check suite Linux linux_unopt has failed. Please fix the issues identified (or deflake) before re-applying this label. |
The presub is failing on a formatting error. |
be15393
to
820865e
Compare
All green again @reidbaker @chinmaygarde |
…142799) flutter/engine@b35153d...e292632 2024-02-02 cone.bart@gmail.com [Android] Fix TextInputType.none for devices with physical keyboard (flutter/engine#49980) 2024-02-02 98614782+auto-submit[bot]@users.noreply.github.com Reverts "Add the focus state related methods to the platform dispatcher" (flutter/engine#50268) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-engine-flutter-autoroll Please CC matanl@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
I have upgraded my Flutter version to 3.19.6. but I am still having the issue. I am unable to receive data from the physical keyboard when keyboardType is set to TextInputType.none on a TextField. |
|
Every thing working fine. For the first time I have to use a physical keyboard to take input. After that I am able to take input from the barcode scanning device. i am using Newland Barcode Scanner. i have updated flutter to 3.22.0 |
Description
This PR fixes an issue where keystrokes aren't received on Android devices with physical keyboards (e.g. rugged Zebra devices) when
keyboardType
is set toTextInputType.none
on aTextField
.The logic in
setTextInputClient
andcanShowTextInput
created aninputTarget
withInputTarget.Type.NO_TARGET
which caused the input connection to short circuit and not be established.Bug introduction PR: #26585
Related Issue
flutter/flutter#89983
Unit Test Notes
showTextInput_textInputTypeNone()
stays green after update.inputConnection_textInputTypeNone()
updated toassertNotNull
. I would make this more specific, but this is my first venture into the Flutter engine and don't know enough about those connection attributes.Demo
Video below with Zebra MC9300 device. This issue can also be reproduced in a standard android emulator. Simply add a
TextField
, configurekeyboardType
to beTextInputType.none
and attempt to enter text after running and giving focus to textfield.Before
before.mov
After
after.mov
Pre-launch Checklist
///
).