Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(486)

Unified Diff: content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java

Issue 304743007: Page gets zoomed in when user taps URL bar after clearing text in an input field (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Review comments fixed. Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698