Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Send button does not appear when the internet connection is disabled #22981

Merged
merged 2 commits into from
Jul 19, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/components/PDFView/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
arosiclair marked this conversation as resolved.
Show resolved Hide resolved
this.toggleKeyboardOnSmallScreens(true);
} else if (this.state.isKeyboardOpen && this.props.windowHeight > prevProps.windowHeight) {
this.toggleKeyboardOnSmallScreens(false);
Expand Down