Upstream version 5.34.104.0
[platform/framework/web/crosswalk.git] / src / content / public / android / java / src / org / chromium / content / browser / input / AdapterInputConnection.java
index 05d04c1..369d5ed 100644 (file)
@@ -225,6 +225,13 @@ public class AdapterInputConnection extends BaseInputConnection {
             mImeAdapter.sendKeyEventWithKeyCode(KeyEvent.KEYCODE_ENTER,
                     KeyEvent.FLAG_SOFT_KEYBOARD | KeyEvent.FLAG_KEEP_TOUCH_MODE
                     | KeyEvent.FLAG_EDITOR_ACTION);
+
+            if ((actionCode == EditorInfo.IME_ACTION_GO || actionCode == EditorInfo.IME_ACTION_DONE
+                    || actionCode == EditorInfo.IME_ACTION_SEARCH) && isActive()) {
+                // User is done typing, hide the keyboard.
+                InputMethodManagerWrapper wrapper = getInputMethodManagerWrapper();
+                wrapper.hideSoftInputFromWindow(mInternalView.getWindowToken(), 0, null);
+            }
         }
         return true;
     }