If you type into a StyleClassedTextArea, then press CTRL-Z, then begin typing again, the cursor gets reset to the start of the text.
Code:
StyleClassedTextArea textArea = new StyleClassedTextArea();
textArea.replaceText(node.getText());
textArea.setStyle("-fx-font-family: '" + textFont.getFamily() + "'; -fx-font-size: " + textFont.getSize());
textArea.setWrapText(true);
//Update body text
textArea.textProperty().addListener((o, oldText, newText) -> {
snip
});
VirtualizedScrollPane<StyleClassedTextArea> scrollPane = new VirtualizedScrollPane<StyleClassedTextArea>(textArea);
StackPane.setAlignment(scrollPane, Pos.CENTER);
StackPane.setMargin(scrollPane, new Insets(START_BODY_Y, 20, 20, 20));
getChildren().add(scrollPane);
Also, if there's no way to fix this, is there a way to just disable CTRL-Z entirely?
If you type into a StyleClassedTextArea, then press CTRL-Z, then begin typing again, the cursor gets reset to the start of the text.
Code:
Also, if there's no way to fix this, is there a way to just disable CTRL-Z entirely?