-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Fixed picker allows user input if the keyboard is visible #26382
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
Conversation
|
Hey there @NirmalKumarYuvaraj! Thank you so much for your PR! Someone from the team will get assigned to your PR shortly and we'll get it reviewed. |
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
|
Azure Pipelines successfully started running 3 pipeline(s). |
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
PureWeen
left a comment
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.
-
if we make these changes I think they should be moved here
public static void Init(EditText editText) -
From looking at PickerManager it doesn't look like we want to completely disable the keyboard
@PureWeen , I have modified the code changes. please let me know if you have any concerns. |
|
/rebase |
2538241 to
a9cee5f
Compare
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
a9cee5f to
a11040e
Compare
| static void OnKeyPress(object? sender, AView.KeyEventArgs e) | ||
| { | ||
| //To prevent user from entering text when focus is received | ||
| e.Handled = true; |
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.
I don't think we'll want to handle every single keypress event.
This will probably break scenarios where a user has a hardware keyboard connected to the device and is trying to use tab to navigate components
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.
@PureWeen , Pressing the Tab key focuses on the EditText, causing the picker dialog to open. Navigation does not occur between the components. According to the implementation, a change in focus triggers the dialog to appear on the view. I have shared a video for reference. please let me know if you have any concerns.
Screen.Recording.2025-03-11.at.5.33.22.PM.mov
bb78331 to
424a347
Compare
|
/rebase |
96cf85a to
9107a21
Compare
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
|
/rebase |
Some times the text is entered in entry instead of picker
Some times the text is entered in entry instead of picker
9107a21 to
3ade9eb
Compare
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
Code changes made.
Issue Details
User can input text when keyboard is open in picker.
Root Cause
The base view for the picker in the unfocused state is AppCompatEditText. It allows the user to edit using keyboard.
Description of Change
Setting the e.Handled to true in the KeyPress will prevent from further processing of the keys.
Validated the behaviour in the following platforms
Issues Fixed
Fixes #24930
Fixes #8265
Output
Before.mov
After.mov