Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 63662480 authored by Leon Scroggins III's avatar Leon Scroggins III Committed by Android (Google) Code Review
Browse files

Merge "Only close the IME if it is Active on the WebView."

parents 6874bd0b 71d17e40
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -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();
    }
+4 −2
Original line number Diff line number Diff line
@@ -3701,9 +3701,11 @@ public class WebView extends AbsoluteLayout
    private void hideSoftKeyboard() {
        InputMethodManager imm = (InputMethodManager)
                getContext().getSystemService(Context.INPUT_METHOD_SERVICE);

        if (imm.isActive(this)
                || (inEditingMode() && imm.isActive(mWebTextView))) {
            imm.hideSoftInputFromWindow(this.getWindowToken(), 0);
        }
    }

    /*
     * This method checks the current focus and cursor and potentially rebuilds