Skip to content

Commit

Permalink
request FlutterView focus when setting a platform view text client (f…
Browse files Browse the repository at this point in the history
  • Loading branch information
amirh authored Jun 19, 2019
1 parent 4a3e69d commit 4c9fa49
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,10 @@ private void setTextInputClient(int client, TextInputChannel.Configuration confi
}

private void setPlatformViewTextInputClient(int platformViewId) {
// We need to make sure that the Flutter view is focused so that no imm operations get short circuited.
// Not asking for focus here specifically manifested in a but on API 28 devices where the platform view's
// request to show a keyboard was ignored.
mView.requestFocus();
inputTarget = new InputTarget(InputTarget.Type.PLATFORM_VIEW, platformViewId);
mImm.restartInput(mView);
mRestartInputPending = false;
Expand Down

0 comments on commit 4c9fa49

Please sign in to comment.