Closed Bug 1450142 Opened 6 years ago Closed 6 years ago

TextInputController needs a method for suppressing the soft input keyboard

Categories

(GeckoView :: IME, enhancement)

enhancement
Not set
normal

Tracking

(firefox61 fixed)

RESOLVED FIXED
mozilla61
Tracking Status
firefox61 --- fixed

People

(Reporter: rbarker, Assigned: rbarker)

Details

Attachments

(1 file)

Currently, when the GeckoInputConnection is created by TextInputController, it will always request the soft input keyboard be shown prior to text input. For VR applications, the soft input keyboard will cover the view. EditText has a function called setShowSoftInputOnFocus which suppresses the keyboard on focus. TextInputController needs a similar function.
Assignee: nobody → rbarker
In the hour since I wrote this, TextInputController has been renamed SessionTextInput but the idea still stands.
Comment on attachment 8963815 [details]
Bug 1450142 - Add setShowSoftInputOnFocus() to TextInputController

https://reviewboard.mozilla.org/r/232680/#review238196

Looks good to me.
Attachment #8963815 - Flags: review?(droeh) → review+
Comment on attachment 8963815 [details]
Bug 1450142 - Add setShowSoftInputOnFocus() to TextInputController

https://reviewboard.mozilla.org/r/232680/#review238296

::: mobile/android/geckoview/src/main/java/org/mozilla/geckoview/SessionTextInput.java:298
(Diff revision 1)
> +    /**
> +     * Prevent soft input when gaining focus
> +     *
> +     * @param showSoftInputOnFocus If true, soft input will be shown on focus
> +     */
> +    public void setShowSoftInputOnFocus(boolean showSoftInputOnFocus) {

This should be `synchronized`
Attachment #8963815 - Flags: review?(nchen) → review+
Comment on attachment 8963815 [details]
Bug 1450142 - Add setShowSoftInputOnFocus() to TextInputController

https://reviewboard.mozilla.org/r/232680/#review238298

::: mobile/android/geckoview/src/main/java/org/mozilla/geckoview/SessionTextInput.java:294
(Diff revision 1)
>          ThreadUtils.assertOnUiThread();
>          return mInputConnection != null && mInputConnection.isInputActive();
>      }
> +
> +    /**
> +     * Prevent soft input when gaining focus

Also, I think this should be "Set whether soft input is shown when an input field gains focus."
Pushed by rbarker@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/3634b781cadf
Add setShowSoftInputOnFocus() to SessionTextInput r=jchen,droeh
https://hg.mozilla.org/mozilla-central/rev/3634b781cadf
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 61
Product: Firefox for Android → GeckoView
Target Milestone: Firefox 61 → mozilla61

Moving some keyboard bugs to the new GeckoView::IME component.

Component: General → IME
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: