-
Notifications
You must be signed in to change notification settings - Fork 200
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
useKeyboard() keyboardHeight is always 0 for first time #226
Comments
The same Issue Here, when I created a useEffect on |
I think this happens because to measure the keyboard height, it should be shown at least one time. I didn't see the code, so I'm sorry if I'm wrong. I made a similar hook by my hand before, and this is the only way it worked. If you do not feel uncomfortable with it, you can add an invisible text input somewhere, and on app startup, you trigger its focus and then blur it. The keyboard will flash, but you will have the correct value. It is not perfect but can help while we don't have a better way. |
The |
I can also reproduce this. |
Is there any fix for this? it's still happening for Android |
No description provided.
The text was updated successfully, but these errors were encountered: