Merge "Only close the IME if it is Active on the WebView."
This commit is contained in:
committed by
Android (Google) Code Review
commit
6366248017
@@ -594,8 +594,10 @@ import java.util.ArrayList;
|
||||
*/
|
||||
/* package */ void remove() {
|
||||
// hide the soft keyboard when the edit text is out of focus
|
||||
InputMethodManager.getInstance(mContext).hideSoftInputFromWindow(
|
||||
getWindowToken(), 0);
|
||||
InputMethodManager imm = InputMethodManager.getInstance(mContext);
|
||||
if (imm.isActive(this)) {
|
||||
imm.hideSoftInputFromWindow(getWindowToken(), 0);
|
||||
}
|
||||
mWebView.removeView(this);
|
||||
mWebView.requestFocus();
|
||||
}
|
||||
|
||||
@@ -3701,8 +3701,10 @@ public class WebView extends AbsoluteLayout
|
||||
private void hideSoftKeyboard() {
|
||||
InputMethodManager imm = (InputMethodManager)
|
||||
getContext().getSystemService(Context.INPUT_METHOD_SERVICE);
|
||||
|
||||
imm.hideSoftInputFromWindow(this.getWindowToken(), 0);
|
||||
if (imm.isActive(this)
|
||||
|| (inEditingMode() && imm.isActive(mWebTextView))) {
|
||||
imm.hideSoftInputFromWindow(this.getWindowToken(), 0);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user