| Index: content/public/android/java/src/org/chromium/content/browser/input/ImeAdapter.java
|
| diff --git a/content/public/android/java/src/org/chromium/content/browser/input/ImeAdapter.java b/content/public/android/java/src/org/chromium/content/browser/input/ImeAdapter.java
|
| index c8447b0e7cf88b35d5e2948a92549eaaabaf3231..b706024fdb916797c7a61328ce890a30cc94f2e5 100644
|
| --- a/content/public/android/java/src/org/chromium/content/browser/input/ImeAdapter.java
|
| +++ b/content/public/android/java/src/org/chromium/content/browser/input/ImeAdapter.java
|
| @@ -54,7 +54,7 @@ import org.chromium.ui.picker.InputDialogContainer;
|
| @JNINamespace("content")
|
| public class ImeAdapter {
|
| private static final String TAG = "cr_Ime";
|
| - private static final boolean DEBUG_LOGS = false;
|
| + private static final boolean DEBUG_LOGS = true;
|
|
|
| public static final int COMPOSITION_KEY_CODE = 229;
|
|
|
| @@ -92,7 +92,7 @@ public class ImeAdapter {
|
| static KeyCharacterMap sKeyCharacterMap;
|
|
|
| private long mNativeImeAdapterAndroid;
|
| - private InputMethodManagerWrapper mInputMethodManagerWrapper;
|
| + public InputMethodManagerWrapper mInputMethodManagerWrapper;
|
| private ChromiumBaseInputConnection mInputConnection;
|
| private ChromiumBaseInputConnection.Factory mInputConnectionFactory;
|
|
|
| @@ -221,6 +221,7 @@ public class ImeAdapter {
|
| @VisibleForTesting
|
| public void setInputMethodManagerWrapperForTest(InputMethodManagerWrapper immw) {
|
| mInputMethodManagerWrapper = immw;
|
| +
|
| if (mCursorAnchorInfoController != null) {
|
| mCursorAnchorInfoController.setInputMethodManagerWrapperForTest(immw);
|
| }
|
| @@ -347,6 +348,9 @@ public class ImeAdapter {
|
| if (nativeImeAdapter != 0) {
|
| createInputConnectionFactory();
|
| }
|
| +
|
| + // for navigation
|
| + resetAndHideKeyboard();
|
| }
|
|
|
| /**
|
| @@ -427,6 +431,7 @@ public class ImeAdapter {
|
| * Call this when view is detached from window
|
| */
|
| public void onViewDetachedFromWindow() {
|
| + resetAndHideKeyboard();
|
| if (mInputConnectionFactory != null) {
|
| mInputConnectionFactory.onViewDetachedFromWindow();
|
| }
|
| @@ -438,7 +443,6 @@ public class ImeAdapter {
|
| */
|
| public void onViewFocusChanged(boolean gainFocus) {
|
| if (DEBUG_LOGS) Log.w(TAG, "onViewFocusChanged: gainFocus [%b]", gainFocus);
|
| - if (!gainFocus) resetAndHideKeyboard();
|
| if (mInputConnectionFactory != null) {
|
| mInputConnectionFactory.onViewFocusChanged(gainFocus);
|
| }
|
|
|