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] Hide keyboard when view is destroyed #7295

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

fiznool
Copy link
Contributor

@fiznool fiznool commented Oct 6, 2021

Fixes #7008

All credit here must go to @enahum, I am merely packing the changes into a PR.

@enahum
Copy link

enahum commented Oct 6, 2021

Perhaps we could add an option to control if the Keyboard should dismiss or not, as I mentioned in the issue #7008 this was causing other unforeseen issues, so by adding an option that defaults to true and respecting that option we could then hide the keyboard or leave it opened.

@enahum
Copy link

enahum commented Oct 6, 2021

Btw thanks for submitting a PR ;)

@fiznool
Copy link
Contributor Author

fiznool commented Oct 6, 2021

I will bow to superior knowledge here! The original patch is working well for us but I can see how it isn't a silver bullet. Perhaps this PR should be closed in favour of another?

FWIW I like the blurOnUnmount option, this is already present in the options but doesn't seem to be respected in this use case, so using that seems to be a good course of action.

@swabbass
Copy link
Contributor

swabbass commented Oct 6, 2021

We already making checks in our playground. and maybe adding e2e's for such cases. I already debugged that internally with our devs and found out about why Keyboard.dismiss did not work, and made it work, gonna try to see what was that, but mainly we want to reproduce the issue in our playground and introduce a proper solution if Keyboard dismiss should be handled in our side

@fiznool
Copy link
Contributor Author

fiznool commented Oct 6, 2021

If it helps, we saw the issue when using Navigation.setRoot to move from a single screen (inside a stack) to a stack with a sideMenu. In this case, if the keyboard was showing when the call is made, it does not dismiss.

@swabbass swabbass added this to Selected for Development in React Native Navigation Oct 7, 2021
@swabbass swabbass linked an issue Oct 12, 2021 that may be closed by this pull request
@swabbass
Copy link
Contributor

I tried to reproduce the issue without the changes mentioned here, but could not reproduce it see.

Let's first reproduce the issue in a minimal environment as the guidelines state and see what is the problem itself and then we might push a fix.

Copy link
Contributor

@swabbass swabbass left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to reproduce the bug first with a minimal code and then we might visit this solution, see my last comment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
React Native Navigation
  
Selected for Development
4 participants