Slavik Manukyan
ec6e274172
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
2016-11-14 11:58:58 -08:00
..
2016-09-06 04:43:36 -07:00
2016-09-01 19:43:47 -07:00
2016-10-14 08:13:55 -07:00
2016-11-14 09:43:34 -08:00
2016-10-11 07:43:52 -07:00
2016-11-04 05:43:44 -07:00
2016-10-11 10:14:28 -07:00
2016-11-04 05:43:44 -07:00
2016-10-16 15:28:42 -07:00
2016-11-14 11:58:58 -08:00
2016-11-14 09:13:40 -08:00
2016-11-14 08:59:24 -08:00
2016-04-21 09:28:23 -07:00
2016-10-12 19:28:42 -07:00
2016-10-24 09:58:53 -07:00
2016-11-14 11:58:58 -08:00
2016-11-04 14:58:46 -07:00
2016-11-04 05:43:44 -07:00
2016-11-04 05:43:44 -07:00
2016-11-02 12:29:15 -07:00
2016-10-14 18:59:10 -07:00
2016-08-09 06:43:46 -07:00
2016-10-11 07:43:52 -07:00
2016-11-04 18:43:42 -07:00
2016-11-07 20:43:37 -08:00
2016-11-11 09:43:48 -08:00
2016-11-08 12:43:48 -08:00
2016-11-04 05:43:44 -07:00
2016-09-19 14:46:12 -07:00
2016-11-14 11:28:47 -08:00
2016-10-16 15:43:44 -07:00
2016-11-04 05:43:44 -07:00
2016-11-08 12:43:48 -08:00
2016-11-08 12:43:48 -08:00
2016-09-01 19:43:47 -07:00
2016-10-05 07:28:44 -07:00
2016-07-25 03:43:29 -07:00
2016-08-09 06:43:46 -07:00
2016-11-04 05:43:44 -07:00
2016-11-10 08:58:41 -08:00
2016-11-11 00:28:40 -08:00
2016-08-12 07:28:38 -07:00
2016-09-01 19:43:47 -07:00
2016-10-12 08:43:37 -07:00
2016-08-02 07:58:28 -07:00
2016-03-15 05:22:22 -07:00