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

Fix initial keyboard animation if prevValue is 0 #2553

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

Conversation

danilvalov
Copy link
Contributor

After adding support for bottomOffset I found some case on iOS:

When we first open the keyboard on iOS we skip the animation logic because prevValue is 0:

 value 260
 prevValue 0
 // (prevValue && value !== prevValue) is false

We don't see this issue on Android, as the keyboard gets a bunch of values ​​when first opened:

 value 0
 prevValue 0
 // (prevValue && value !== prevValue) is false
 value 18
 prevValue 0
 // (prevValue && value !== prevValue) is false
 value 50
 prevValue 18
 // (prevValue && value !== prevValue) is true

(all of these triggers above are triggered on first press)

prevValue can be null or a number, and I couldn't understand why we check prevValue instead of prevValue !== null, so I changed this condition.

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.

1 participant