Skip to content

Fix problem with keyboard staying open on Android after screen change #603

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

Merged
merged 1 commit into from
Aug 17, 2020

Conversation

kmagiera
Copy link
Member

This is a follow up fix after #592 where we attempted to fix the issue while introducing a regression in the way autoFocus is handled. That is, in case there was a text field with an auto focus in the next screen, the logic we added for screen dismissal would cause it to immediately lose focus.

This fix moves the logic responsible for keyboard force-dismiss to execute earlier – at the moment when we attempt to detach the previous screen. This way we can still rely on the focused child property to point to a correct children. Note that before, detaching a view would result in the child losing focus but the keyboard would stay open. We now use this fact and can verify that the focused children is the one being removed, and only in that case we ask system to hide the keyboard.

Unverified

This user has not yet uploaded their public signing key.
@kmagiera kmagiera requested a review from WoLewicki August 14, 2020 14:27
@kmagiera kmagiera merged commit 4a90df5 into master Aug 17, 2020
@kmagiera kmagiera deleted the fix-keyboard-once-again branch August 17, 2020 10:56
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.

None yet

2 participants