From bcd4300efe151d39d23f582737456715c1fd2d24 Mon Sep 17 00:00:00 2001 From: dukenv0307 Date: Mon, 17 Jul 2023 09:17:31 +0700 Subject: [PATCH 1/2] fix: Send button does not appear when the internet connection is disabled --- src/components/PDFView/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/PDFView/index.js b/src/components/PDFView/index.js index 5441f9666dcc..cb4a8f6dd568 100644 --- a/src/components/PDFView/index.js +++ b/src/components/PDFView/index.js @@ -38,7 +38,7 @@ 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) { + 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); From 71d3f7fdbdd8125c995163ce18098a503a0ac726 Mon Sep 17 00:00:00 2001 From: dukenv0307 Date: Tue, 18 Jul 2023 22:27:35 +0700 Subject: [PATCH 2/2] fix: add comment --- src/components/PDFView/index.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/components/PDFView/index.js b/src/components/PDFView/index.js index cb4a8f6dd568..e56e753d4853 100644 --- a/src/components/PDFView/index.js +++ b/src/components/PDFView/index.js @@ -38,6 +38,9 @@ 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. + // 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) {