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

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

Issue 2290133002: Make WebView keep keyboard when losing focus (Closed)
Patch Set: rebase Created 4 years, 1 month 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
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..b8f0cd6029e1de64ae97bf94c5dc78c16eb65a0b 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
@@ -347,6 +347,7 @@ public class ImeAdapter {
if (nativeImeAdapter != 0) {
createInputConnectionFactory();
}
+ resetAndHideKeyboard();
}
/**
@@ -427,6 +428,7 @@ public class ImeAdapter {
* Call this when view is detached from window
*/
public void onViewDetachedFromWindow() {
+ resetAndHideKeyboard();
if (mInputConnectionFactory != null) {
mInputConnectionFactory.onViewDetachedFromWindow();
}
@@ -438,7 +440,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);
}

Powered by Google App Engine
This is Rietveld 408576698