When deleting the last character in a textarea by pressing backspace, the caret disappear.
To reproduce:
public class AppTest extends Application {
private Scene scene;
@Override
public void start(Stage stage) {
// create scene
TextArea t = new TextArea("");
TextArea t2 = new TextArea("");
VBox box = new VBox();
box.getChildren().addAll(t, t2);
scene = new Scene(box, 400, 600);
stage.setScene(scene);
stage.show();
}
public static void main(String[] args) {
launch(args);
}
}
1) Type "aa" in the first textarea
2) Click in the second textarea
3) Click back in the first text area.
4) Press backspace to clear the text. Once the textarea is cleared, the caret is no longer visible.
To reproduce:
public class AppTest extends Application {
private Scene scene;
@Override
public void start(Stage stage) {
// create scene
TextArea t = new TextArea("");
TextArea t2 = new TextArea("");
VBox box = new VBox();
box.getChildren().addAll(t, t2);
scene = new Scene(box, 400, 600);
stage.setScene(scene);
stage.show();
}
public static void main(String[] args) {
launch(args);
}
}
1) Type "aa" in the first textarea
2) Click in the second textarea
3) Click back in the first text area.
4) Press backspace to clear the text. Once the textarea is cleared, the caret is no longer visible.
- duplicates
-
JDK-8176031 In TextArea caret disappears if moved by arrows to the first position after unfocus and focus again
-
- Closed
-
- relates to
-
JDK-8217498 TextArea's caret doesn't update on font change until clicked by mouse.
-
- Open
-