Q:

JavaFX TextField cancelEdit not working as expected

I have a TextField and I would like the contents of the field to be restored to their previous value when I press Esc which is expected behaviour on most systems (I have no idea why JavaFX doesn't do this by default). 
To this end I tried to use TextField.cancelEdit() but it appears that this is doing nothing. 
Here is a SSCCE
import javafx.application.Application;
import javafx.scene.Group;
import javafx.scene.Scene;
import javafx.scene.control.TextField;
import javafx.scene.input.KeyCode;
import javafx.stage.Stage;

public class UiTest2Controller extends Application {
    public static void main(String[] args) {
        launch(args);
    }

    @Override
    public void start(Stage aPrimaryStage) throws Exception {
        final TextField field = new TextField();
        field.setOnAction(aEvent -> {
            System.out.println("Action");
        });
        field.setOnKeyPressed(aEvent -> {
            if (aEvent.getCode() == KeyCode.ESCAPE) {
                System.out.println("Escape");
                field.cancelEdit();
                field.getParent().requestFocus();
            }
        });
        field.setPromptText("Hello World...");

        aPrimaryStage.setScene(new Scene(new Group(field)));
        aPrimaryStage.show();
    }
}

Steps to reproduce: 

Type something in the text field
Press Esc

Expected behaviour: The field returns to previous value (empty first time) and focus is lost.
Actual behaviour: The fiels retains its value at the time and focus is lost.

A:

I am not sure about the specifics, but it seems to work as expected if the TextField has a TextFormatter assigned:  
field.setTextFormatter(new TextFormatter<>(TextFormatter.IDENTITY_STRING_CONVERTER));

