Skip to content
This repository has been archived by the owner on Jul 22, 2024. It is now read-only.

Commit

Permalink
Update keyboard IME action when input is restarted (#1916)
Browse files Browse the repository at this point in the history
  • Loading branch information
MortimerGoro authored and bluemarvin committed Oct 4, 2019
1 parent 93b664b commit 1e408bf
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ public class KeyboardWidget extends UIWidget implements CustomKeyboardView.OnKey
private String mComposingDisplayText = "";
private boolean mInternalDeleteHint = false;
private SessionStack mSessionStack;
private boolean mInputRestarted = false;

private class MoveTouchListener implements OnTouchListener {
@Override
Expand Down Expand Up @@ -914,13 +915,15 @@ private void displayComposingText(String aText, ComposingAction aAction) {
@Override
public void restartInput(@NonNull GeckoSession session, int reason) {
resetKeyboardLayout();
mInputRestarted = true;
}

@Override
public void showSoftInput(@NonNull GeckoSession session) {
if (mFocusedView != mAttachedWindow || getVisibility() != View.VISIBLE) {
if (mFocusedView != mAttachedWindow || getVisibility() != View.VISIBLE || mInputRestarted) {
updateFocusedView(mAttachedWindow);
}
mInputRestarted = false;
}

@Override
Expand Down

0 comments on commit 1e408bf

Please sign in to comment.