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

Update keyboard IME action when input is restarted #1916

Merged
merged 1 commit into from
Oct 4, 2019
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
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