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

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

Issue 2013983003: Fix WebView not to hide soft keyboard on navigation (Closed) Base URL: https://chromium.googlesource.com/a/chromium/src.git@2743
Patch Set: Created 4 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 | « content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java ('k') | 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/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 d3ece9cf66144a93f5db4c0922a1c24384bfe8f3..411d13b4bf4587e93edef22f8564106fecb00804 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
@@ -323,6 +323,7 @@ public class ImeAdapter {
* @param nativeImeAdapter The pointer to the native ImeAdapter object.
*/
public void attach(long nativeImeAdapter) {
+ if (DEBUG_LOGS) Log.d(TAG, "attach");
if (mNativeImeAdapterAndroid == nativeImeAdapter) return;
if (mNativeImeAdapterAndroid != 0) {
nativeResetImeAdapter(mNativeImeAdapterAndroid);
@@ -397,7 +398,7 @@ public class ImeAdapter {
*/
public void onViewFocusChanged(boolean gainFocus) {
if (DEBUG_LOGS) Log.w(TAG, "onViewFocusChanged: gainFocus [%b]", gainFocus);
- if (!gainFocus) reset();
+ if (!gainFocus) resetAndHideKeyboard();
}
/**
@@ -436,8 +437,8 @@ public class ImeAdapter {
/**
* Resets IME adapter and hides keyboard. Note that this will also unblock input connection.
*/
- public void reset() {
- if (DEBUG_LOGS) Log.w(TAG, "reset");
+ public void resetAndHideKeyboard() {
+ if (DEBUG_LOGS) Log.w(TAG, "resetAndHideKeyboard");
mTextInputType = TextInputType.NONE;
mTextInputFlags = 0;
// This will trigger unblocking if necessary.
« no previous file with comments | « content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698