To reproduce:
When app is opened and text field get focus - all the text is selected.
1. Click with mouse after the last character.
2. Type any letter.
3. The letter appears before the last character!
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.control.TextField;
import javafx.scene.layout.HBox;
import javafx.stage.Stage;
public class TextFieldCaretPos extends Application {
public static void main(String[] args) {
launch(args);
}
@Override
public void start(Stage stage) throws Exception {
HBox root = new HBox();
TextField textField = new TextField("Simple tet");
root.getChildren().add(textField);
Scene scene = new Scene(root, 300, 200);
stage.setScene(scene);;
stage.show();
}
}