Fix keyboard layout for ios 9 and 10 (#1256)

This commit is contained in:
enahum 2017-12-04 17:07:08 -03:00 committed by GitHub
parent 86667de6c3
commit 7afc0c4143
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -49,10 +49,11 @@ export default class KeyboardLayout extends PureComponent {
const {endCoordinates, duration, startCoordinates} = e;
let height = 0;
if (startCoordinates.height < endCoordinates.height) {
if (startCoordinates.height < endCoordinates.height || endCoordinates.screenY < startCoordinates.screenY) {
height = endCoordinates.height;
}
this.setState({bottom: new Animated.Value(height)});
Animated.timing(this.state.bottom, {
toValue: height,
duration