Update index.js

修复在0.31版本下的 e.endCoordinates.screenY的报错问题
This commit is contained in:
huip 2016-08-20 12:26:27 +08:00 committed by GitHub
parent 09fe1b8a6e
commit 774d39a8eb
1 changed files with 1 additions and 1 deletions

View File

@ -112,7 +112,7 @@ export default class InputScrollView extends Component {
e=>{console.warning(e)},
(left, top, width, height)=>{
let keyboardScreenY = Dimensions.get('window').height;
if (e) {
if (e.endCoordinates) {
keyboardScreenY = e.endCoordinates.screenY;
}
let scrollOffsetY = top - keyboardScreenY + height + this.props.distance;