diff --git a/src/components/PDFView/index.js b/src/components/PDFView/index.js index 5441f9666dcc..e56e753d4853 100644 --- a/src/components/PDFView/index.js +++ b/src/components/PDFView/index.js @@ -38,7 +38,10 @@ class PDFView extends Component { // Use window height changes to toggle the keyboard. To maintain keyboard state // on all platforms we also use focus/blur events. So we need to make sure here // that we avoid redundant keyboard toggling. - if (!this.state.isKeyboardOpen && this.props.windowHeight < prevProps.windowHeight) { + // Minus 100px is needed to make sure that when the internet connection is + // disabled in android chrome and a small 'No internet connection' text box appears, + // we do not take it as a sign to open the keyboard + if (!this.state.isKeyboardOpen && this.props.windowHeight < prevProps.windowHeight - 100) { this.toggleKeyboardOnSmallScreens(true); } else if (this.state.isKeyboardOpen && this.props.windowHeight > prevProps.windowHeight) { this.toggleKeyboardOnSmallScreens(false);