Andr3wHur5t / react-native-keyboard-spacer

Plug and play react-native keyboard spacer view.
MIT License
1.56k stars 219 forks source link

Fixed onToggle to return false upon keyboard close #14

Closed danvass closed 8 years ago

danvass commented 8 years ago

Previously it always returned true regardless of state.

Andr3wHur5t commented 8 years ago

Just tested, this causes jumping when the keyboard closes on iOS.

danvass commented 8 years ago

@Andr3wHur5t What do you mean? It seems to work normally for me except now toggleState is returning a different value.

Andr3wHur5t commented 8 years ago

I'm looking into a fix, probably need to check if the height is 0.

Andr3wHur5t commented 8 years ago

@DVassilev this fix seems to be causing an issue with the hide animation. On master its smooth, on this branch it jumps down after the keyboard finishes its transition.

danvass commented 8 years ago

@Andr3wHur5t Odd, it remains a smooth transition for me.

Andr3wHur5t commented 8 years ago

@DVassilev my bad, seems the simulator was sending multiple events. Restarting the simulator fixed it.

Looks good :+1: