relativeKeyboardHeight works wrong in some cases
Summary:
relativeKeyboardHeight calculation is wrong when frame.y < keyboardFrame.y
Let's look at an example:
``` jsx
import React, { Component } from 'react';
import {
KeyboardAvoidingView,
TextInput,
AppRegistry,
Text,
View
} from 'react-native';
export default class Test extends Component {
constructor(props, context) {
super(props, context);
}
render() {
return (
<View style={{flex: 1, marginTop: 20}}>
<Text style={{ flex: 1, alignItems: 'center'}}>
Hi! This is test.
</Text>
<KeyboardAvoidingView behavior={'position'} keyboardVerticalOffset={-20} >
<TextInput
style={{height: 40, borderColor: 'gray', borderWidth: 1}}
/>
</KeyboardAvoidingView>
</View>
);
}
}
AppRegistry.registerComponent('Test', () => Test);
```
![rn-relativekb](https://cloud.githubusercontent.com/assets/13254349/17298119/b2192830-5819-11e6-968c-d9e95b6e4aba.gif)
How _relativeKeyboardHeight_ calculates positio
Closes https://github.com/facebook/react-native/pull/9139
Differential Revision: D4168431
Pulled By: hramos
fbshipit-source-id: 9181276355490452071b51b51ed7dc9ab80b2444