diff --git a/index.js b/index.js index 09c1806..2bf17c1 100644 --- a/index.js +++ b/index.js @@ -172,7 +172,9 @@ export default class ModalBox extends React.PureComponent { const keyboardFrame = evt.endCoordinates; const keyboardHeight = this.state.containerHeight - keyboardFrame.screenY; - this.setState({keyboardOffset: keyboardHeight}, () => { + const isFloatingKeyboard = Dimensions.get('window').width !== keyboardFrame.width; + + this.setState({keyboardOffset: isFloatingKeyboard ? 0 : keyboardHeight}, () => { this.animateOpen(); }); }