Android - Fix focus issue when software keyboard is closed #14736
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.
What does the pull request do?
Removed SoftwareKeyboardListener class form the Android project. Its purpose was to clear focus when software keyboard is closed, and that seems to be wrong behaviour, or unexpected behaviour, as it's up to the input control to remove focus when it decide no more input is needed, and not a global listener.
What is the current behavior?
When the software keyboard is closed, the listener forces focus to be cleared. This removes focus from any input element that triggered the software keyboard to close, like clicking a button to remove focus from an active textbox. This can cancel whatever behaviour the new focused element is expected to do, in this case, a button click when the button is released.
What is the updated/expected behavior with this PR?
This behaviour is removed and the class deleted. We already have api to listen for changes in the software keyboard, that controls can subscribe to to clear focus if they need to.
How was the solution implemented (if it's not obvious)?
Checklist
Breaking changes
Obsoletions / Deprecations
Fixed issues
Fixes #11884