[Rev 01] RFR: 8245053: Keyboard doesn't show when TextInputControl has focus

Jeanette Winzenburg fastegal at openjdk.java.net
Tue May 19 09:22:03 UTC 2020


On Tue, 19 May 2020 08:10:40 GMT, Abhinay Agarwal <github.com+3197675+abhinayagarwal at openjdk.org> wrote:

>> In Android, TextInputControls (TextField and TextArea) are responsible for showing and hiding software keyboard.
>> Currently, a focus listener is attached to these controls and is used to toggle the visibility of keyboard. This
>> condition fails in cases where the control already has focus but the keyboard is not visible.  Ideally, the keyboard
>> should be shown again when the user taps on the TextInputControl.
>> This PR adds an event handler for `MouseEvent.MOUSE_CLICKED` event and shows the keyboard  if the TextInput control is
>> both editable and focused.
>
> Abhinay Agarwal has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Remove listeners in dispose method

modules/javafx.controls/src/android/java/javafx/scene/control/skin/TextAreaSkinAndroid.java line 81:

> 80:         getSkinnable().focusedProperty().removeListener(weakFocusChangeListener);
> 81:         super.dispose();
> 82:     }

good :) Next step is to implement dispose according to contract (see JDK-8244112). Currently the pattern in dispose is
something like:

    if (getSkinnable() == null) return;
    ... do cleanup for this skin
    super.dispose();

-------------

PR: https://git.openjdk.java.net/jfx/pull/219


More information about the openjfx-dev mailing list