-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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] [TextBox] fix a bug which cause cannot call out the soft keyboard again after closing it #15603
[Android] [TextBox] fix a bug which cause cannot call out the soft keyboard again after closing it #15603
Conversation
…focus on TextBox, which makes clicking on the TextBox cannot call out the soft keyboard again
You can test this PR using the following package version. |
|
@cla-avalonia agree |
Focus should not be cleared on the textbox when software keyboard is closed, because there may be ongoing operations that require the textbox to keep focus, like with an opened context menu. Instead, tapping the textbox should try to open the software keyboard if it's closed. |
Is there a way to open the soft keyboard? I am not familiar with the code base, and the removing focus behavior is the default behaviour before 11.1.x |
removing focus was the default, but it was buggy behavior, as explained in the pr you linked. |
Can you guide me to make it can show soft keyboard? @emmauss |
Currently, there is no API to directly show the input pane in avalonia, that's directly available to controls |
fixed |
You can test this PR using the following package version. |
A better option would be to add an api for TextInputMethodClient to trigger the software keyboard on demand. |
updated |
You can test this PR using the following package version. |
Is there any update? |
You can test this PR using the following package version. |
When will this be contained in the Release?(In the 11.1.0 rc) |
…yboard again after closing it (#15603) * [Android] fix a bug which cause closing soft keyboard does not clear focus on TextBox, which makes clicking on the TextBox cannot call out the soft keyboard again * change way to show soft keyboard * add new api --------- Co-authored-by: Max Katz <maxkatz6@outlook.com>
[Android] fix a bug which cause closing soft keyboard does not clear focus on TextBox, which makes clicking on the TextBox cannot call out the soft keyboard again
What does the pull request do?
When the TextBox got focus, subscribe to
IInputPane.StateChanged
, to listen the keyboard closing event.After the keyboard closed, remove the focus, and remove the subscribe to the event.
What is the current behavior?
After closing the soft keyboard, cannot call out it again by clicking on the TextBox, as it was focused already.
This behaviour might be related to #14736
Screenrecorder-2024-05-04-23-14-37-630.mp4
What is the updated/expected behavior with this PR?
After closing the soft keyboard, can call out it again by clicking on the TextBox.
How was the solution implemented (if it's not obvious)?
When the TextBox got focus, subscribe to
IInputPane.StateChanged
, to listen the keyboard closing event.After the keyboard closed, remove the focus, so that the keyboard can be call out again.
Checklist
Breaking changes
Obsoletions / Deprecations
Fixed issues