Skip to content
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 focus issue when software keyboard is closed #14736

Merged
merged 1 commit into from
Feb 27, 2024

Conversation

emmauss
Copy link
Contributor

@emmauss emmauss commented Feb 26, 2024

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

@avaloniaui-bot
Copy link

You can test this PR using the following package version. 11.1.999-cibuild0045357-beta. (feed url: https://nuget-feed-all.avaloniaui.net/v3/index.json) [PRBUILDID]

@maxkatz6 maxkatz6 added this pull request to the merge queue Feb 26, 2024
Merged via the queue into master with commit 4898757 Feb 27, 2024
7 checks passed
@maxkatz6 maxkatz6 deleted the fix/android_text_input_focus branch February 27, 2024 00:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Strange button behavior on Android platform
3 participants