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 Keyboard events not working? #43

Closed
niftylettuce opened this issue Feb 5, 2016 · 5 comments
Closed

Android Keyboard events not working? #43

niftylettuce opened this issue Feb 5, 2016 · 5 comments

Comments

@niftylettuce
Copy link
Contributor

Hey, had this issue last night I think... Here was my note:

Why is this still commented as is? Is it not working on RN v0.18+? It doesn't seem to work for me. https://github.com/FaridSafi/react-native-gifted-messenger/blob/master/GiftedMessenger.js#L441-L444

@niftylettuce niftylettuce changed the title From the other day... Keyboard events not working? From the other day... Android Keyboard events not working? Feb 5, 2016
@niftylettuce niftylettuce changed the title From the other day... Android Keyboard events not working? Android Keyboard events not working? Feb 5, 2016
@niftylettuce
Copy link
Contributor Author

Oh, it's the onKeyboardWillHide and onKeyboardWillShow, those two events don't trigger on Android RN v0.18+. This is because it's now built in (see documentation update note here) https://github.com/johanneslumpe/react-native-keyboardevents#react-native-keyboardevents. Maybe we should be using this instead?

@niftylettuce
Copy link
Contributor Author

@FaridSafi
Copy link
Owner

We can use onKeyboardDidShow and onKeyboardDidHide instead of onKeyboardWillShow and onKeyboardWillHide in Android isn't it?

@niftylettuce
Copy link
Contributor Author

@FaridSafi I basically took out all of the keyboard events in my package, and then used the the ref as this._GiftedMessenger to handle events. However I still have a weird state issue, where messages get hidden if I change view, like they don't get set in state.

@FaridSafi
Copy link
Owner

fixed by using onKeyboardDidShow and onKeyboardDidHide instead of onKeyboardWillShow and onKeyboardWillHide in Android

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

No branches or pull requests

2 participants