Skip to content

Commit

Permalink
Merge pull request #750 from goffioul/patch-1
Browse files Browse the repository at this point in the history
Don't request focus explicitly if not needed
  • Loading branch information
dpogue authored Aug 28, 2019
2 parents 9808a0d + 01ab116 commit c93e3e9
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions framework/src/org/apache/cordova/CordovaActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -268,9 +268,11 @@ protected void onResume() {
if (this.appView == null) {
return;
}
// Force window to have focus, so application always
// receive user input. Workaround for some devices (Samsung Galaxy Note 3 at least)
this.getWindow().getDecorView().requestFocus();
if (! this.getWindow().getDecorView().hasFocus()) {
// Force window to have focus, so application always
// receive user input. Workaround for some devices (Samsung Galaxy Note 3 at least)
this.getWindow().getDecorView().requestFocus();
}

this.appView.handleResume(this.keepRunning);
}
Expand Down

0 comments on commit c93e3e9

Please sign in to comment.