[Android] [TextBox] fix a bug which cause cannot call out the soft keyboard again after closing it #15603
+24
−3
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
[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