| Index: content/public/android/java/src/org/chromium/content/browser/input/ThreadedInputConnection.java
|
| diff --git a/content/public/android/java/src/org/chromium/content/browser/input/ThreadedInputConnection.java b/content/public/android/java/src/org/chromium/content/browser/input/ThreadedInputConnection.java
|
| index a295eb041941a12d6e0750d7ddd69367a5936d13..9926e670452081013d3aafb4e2d9d36c12f73957 100644
|
| --- a/content/public/android/java/src/org/chromium/content/browser/input/ThreadedInputConnection.java
|
| +++ b/content/public/android/java/src/org/chromium/content/browser/input/ThreadedInputConnection.java
|
| @@ -115,6 +115,7 @@
|
| private final BlockingQueue<TextInputState> mQueue = new LinkedBlockingQueue<>();
|
| private int mPendingAccent;
|
| private TextInputState mCachedTextInputState;
|
| + private boolean mLastInBatchEditMode;
|
|
|
| ThreadedInputConnection(View view, ImeAdapter imeAdapter, Handler handler) {
|
| super(view, true);
|
| @@ -145,8 +146,12 @@
|
| if (DEBUG_LOGS) Log.w(TAG, "updateState: %s", mCachedTextInputState);
|
|
|
| addToQueueOnUiThread(mCachedTextInputState);
|
| -
|
| - if (isNonImeChange) mHandler.post(mProcessPendingInputStatesRunnable);
|
| + // If state update is caused by explicitly requesting the state update,
|
| + // or batch edit just finished, then we may need to update state to IMM.
|
| + if (isNonImeChange || (mLastInBatchEditMode && !inBatchEditMode)) {
|
| + mHandler.post(mProcessPendingInputStatesRunnable);
|
| + mLastInBatchEditMode = inBatchEditMode;
|
| + }
|
| }
|
|
|
| /**
|
|
|