Skip to content

TextField.requestFocus() and OnScreen Keyboard (Android/iOS) #1344

@LordTylus

Description

@LordTylus

We noticed an UX Issue when dealing with manual calls to requestFocus() on JavaFX Textfields.

It was observed when we used a "license activation" screen that automatically shifts the caret to the next text input.

Essentially we used a text property listener and when 5 characters wer entered, we requested focus of the next textfield in line.

Expected Behavior

the call to textfield.requestFocus() keeps the onScreen Keyboard on Android/iOS open so that the user can continue their input

Current Behavior

Manual calls to textfield.requestFocus() move the caret as expected, but the on screen keyboard on Android/iOS doesn't open. And if it was already opened, the focus lost of the previous text field closes it.

Steps to Reproduce

create a button and a textfield
when you click the button call requestFocus() on the textfield
Observe the onscreen keyboard does not open. Only after the user tapped on it manuall it will open.

Your Environment

Gluon Attach: 4.0.24
Gluon Charm: 6.2.3
Gluon FX Gradle Plugin: 1.0.26
Gluon Substrate: 0.0.68
JavaFX: 21.0.5
GraalVM iOS: 22.2.0
GraalVM Android: Gluon 22.1.0.1-Final

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions