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

Johan Vos jvos at openjdk.java.net
Thu Jun 25 06:42:05 UTC 2020


On Fri, 12 Jun 2020 13:38:10 GMT, Abhinay Agarwal <github.com+3197675+abhinayagarwal at openjdk.org> wrote:

>> worth discussing the case were a TextInput is the only control.
>
> @mipastgt The issue happens because of the focus listener. With this PR, we introduce `mouseEventListener` to show the
> Keyboard on `MOUSE_CLICKED` event. Therefore, the issue brought up by your previous comment should be resolved by
> updating the `focusChangeListener` to:  private final ChangeListener<Boolean> focusChangeListener = (observable,
> wasFocused, isFocused) -> {
>     if (wasFocused && !isFocused) {
>         hideSoftwareKeyboard();
>     }
> };
> 
> We should most probably also introduce an API for showing the keyboard as available on both iOS and Android platforms :)
> 
> Thoughts?

It is probably good to add this suggestion in this PR. I'll review again once it is in.

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

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


More information about the openjfx-dev mailing list