Chromium Code Reviews| Index: content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java |
| diff --git a/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java b/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java |
| index 2fa3eff0720b6227649fe32d4323f6bc308af257..9f4f37955409cfd8f12d13917a8b3160b6274327 100644 |
| --- a/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java |
| +++ b/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java |
| @@ -540,7 +540,7 @@ public class ContentViewCore |
| // always be called, crbug.com/294908. |
| getContainerView().getWindowVisibleDisplayFrame( |
| mFocusPreOSKViewportRect); |
| - } else if (resultCode == |
| + } else if (hasFocus() && resultCode == |
| InputMethodManager.RESULT_UNCHANGED_SHOWN) { |
| // If the OSK was already there, focus the form immediately. |
| scrollFocusedEditableNodeIntoView(); |
| @@ -1573,6 +1573,7 @@ public class ContentViewCore |
| public void onFocusChanged(boolean gainFocus) { |
| if (!gainFocus) { |
| hideImeIfNeeded(); |
| + cancelRequestToScrollFocusedEditableNodeIntoView(); |
|
Ted C
2014/06/02 21:25:46
I agree with jdduke@ that this should be sufficien
|
| } |
| if (mNativeContentViewCore != 0) nativeSetFocus(mNativeContentViewCore, gainFocus); |
| } |