-
Bug
-
Resolution: Duplicate
-
P3
-
None
-
jfx20
-
aarch64
-
android
After the fix for JDK-8296621 (starting 20-ea+11), which removed a focus request after setting the scene, when running on Android, the JavaFX stage doesn't get focused, and therefore textField/textArea controls don't get to show the keyboard if they are not focused (see https://github.com/openjdk/jfx/blob/master/modules/javafx.controls/src/android/java/javafx/scene/control/skin/TextFieldSkinAndroid.java#L46 for instance).
Restoring the focus request fixes the issue (or running with any version before 20-ea+11).
Workaround: as a possible workaround for now, manual focus request, some time after the stage is shown, works:
public void start(Stage stage) {
...
stage.show();
PauseTransition pauseTransition = new PauseTransition(Duration.millis(100));
pauseTransition.setOnFinished(f -> stage.requestFocus());
pauseTransition.playFromStart();
}
Restoring the focus request fixes the issue (or running with any version before 20-ea+11).
Workaround: as a possible workaround for now, manual focus request, some time after the stage is shown, works:
public void start(Stage stage) {
...
stage.show();
PauseTransition pauseTransition = new PauseTransition(Duration.millis(100));
pauseTransition.setOnFinished(f -> stage.requestFocus());
pauseTransition.playFromStart();
}
- duplicates
-
JDK-8306121 Scene not rendered initially when changing scenes after fix for JDK-8296621
- Resolved
- relates to
-
JDK-8296621 Stage steals focus on scene change
- Resolved
-
JDK-8306121 Scene not rendered initially when changing scenes after fix for JDK-8296621
- Resolved
-
JDK-8304734 Monocle: Stage no longer gets focus after fix for JDK-8296621
- Closed