-
Bug
-
Resolution: Cannot Reproduce
-
P4
-
8
-
8.0b69
Run the code:
@Override
public void start(Stage stage) throws Exception {
StackPane root = new StackPane();
final TextField textField = new TextField();
ToggleButton button = new ToggleButton("Display caret");
button.setSelected(true);
button.setOnAction(new EventHandler<ActionEvent>() {
@Override
public void handle(ActionEvent t) {
textField.setStyle("-fx-display-caret : " + ((ToggleButton) t.getSource()).isSelected() + ";");
System.out.println(textField.getStyle());
textField.requestFocus();
}
});
root.getChildren().add(VBoxBuilder.create().children(textField, button).spacing(50).alignment(Pos.CENTER).build());
Scene scene = new Scene(root, 300, 300);
stage.setScene(scene);
stage.show();
}
When -fx-display-caret is set to false, caret is still visible. It becomes invisible, only when focus is put by mouse.
When -fx-display-caret is set to true, caret is still invisible.
Affected tests:
graphics/api/control/TextBox_6aTest.java
@Override
public void start(Stage stage) throws Exception {
StackPane root = new StackPane();
final TextField textField = new TextField();
ToggleButton button = new ToggleButton("Display caret");
button.setSelected(true);
button.setOnAction(new EventHandler<ActionEvent>() {
@Override
public void handle(ActionEvent t) {
textField.setStyle("-fx-display-caret : " + ((ToggleButton) t.getSource()).isSelected() + ";");
System.out.println(textField.getStyle());
textField.requestFocus();
}
});
root.getChildren().add(VBoxBuilder.create().children(textField, button).spacing(50).alignment(Pos.CENTER).build());
Scene scene = new Scene(root, 300, 300);
stage.setScene(scene);
stage.show();
}
When -fx-display-caret is set to false, caret is still visible. It becomes invisible, only when focus is put by mouse.
When -fx-display-caret is set to true, caret is still invisible.
Affected tests:
graphics/api/control/TextBox_6aTest.java