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 crash in android when hide keyboard #117

Merged

Conversation

Gamal-Shaban
Copy link
Contributor

Summary

this fixes issue crash in android when hiding keyboard by checking e variable not null

Test Plan

  • show keyboard and hide will crash in android in old code
  • in new code fix crash in anroid

What's required for testing (prerequisites)?

android keyboard

What are the steps to reproduce (after prerequisites)?

when use (useKeyboard) hook in android and show keyboard and hide it will crash
because of variable e in function handleKeyboardDidHide was null in android
I fix it checking for variable e is true

Compatibility

OS Implemented
iOS
Android
Web

Checklist

  • [ * ] I have tested this on a device and a simulator
  • I added the documentation in README.md
  • I updated the typed files (TS and Flow)
  • I've created a snack to demonstrate the changes: LINK HERE

@pvinis pvinis added patch Increment the patch version when merged release Create a release when this pr is merged labels Mar 30, 2020
@pvinis
Copy link
Member

pvinis commented Mar 30, 2020

Yep, that change makes sense. Thank you for that fix! :)

PS: No need to ping everyone in the world after 20 hours 😅. Give us at least a working day to process things, especially on a non-critical issue. Still, thank you for your contribution! :D

@pvinis pvinis merged commit 5308bc0 into react-native-community:master Mar 30, 2020
@Gamal-Shaban
Copy link
Contributor Author

@pvinis sorry

@pvinis
Copy link
Member

pvinis commented Mar 30, 2020

🚀 PR was released in v2.4.8 🚀

@pvinis pvinis added the released This issue/pull request has been released. label Mar 30, 2020
@vonovak
Copy link
Member

vonovak commented Mar 30, 2020

@Gamal-Shaban @pvinis shouldn't the else branch be covered as well? This way when the keyboard hides, consumers relying on coordinates will receive stale value

@pvinis
Copy link
Member

pvinis commented Mar 30, 2020

Yep, that makes sense. We went from one bug to another. @Gamal-Shaban would you mind making a new PR to fix that too?

(We really should add some tests 😅.)

@Gamal-Shaban
Copy link
Contributor Author

Gamal-Shaban commented Mar 30, 2020

you are welcome @pvinis
done
PR (#120 )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
patch Increment the patch version when merged release Create a release when this pr is merged released This issue/pull request has been released.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants