-
Bug
-
Resolution: Unresolved
-
P4
-
8u60
-
8u60b5, win 7
At the very beginning after startup, we still can't start editing via keyboard, at least not by anything intuitive. All works as expected after having clicked once into a cell or (and this is the unintuitive part) having pressed ctrl-left/ctrl-right once.
/**
* Can't start editing via keyboard initially.
* Left-over part of issueRT-38464
*
* To reproduce, run example
* - press down (or any navigation key) to select a row
* - press F2
* - expected: editing started
* - actual: nothing happens
*
*/
public class TableInitialCellEdit extends Application {
ObservableList<MenuItem> data = FXCollections.observableArrayList(
new MenuItem("some"),
new MenuItem("dummy"),
new MenuItem("data")
);
private Parent getContent() {
TableView<MenuItem> table = new TableView<>(data);
table.setEditable(true);
TableColumn<MenuItem, String> text = new TableColumn<>("Text");
text.setCellValueFactory(new PropertyValueFactory<>("text"));
text.setCellFactory(TextFieldTableCell.forTableColumn());
table.getColumns().addAll(text);
return new BorderPane(table);
}
@Override
public void start(Stage primaryStage) throws Exception {
primaryStage.setScene(new Scene(getContent()));
primaryStage.setTitle(VersionInfo.getRuntimeVersion());
primaryStage.show();
}
public static void main(String[] args) {
launch(args);
}
}
/**
* Can't start editing via keyboard initially.
* Left-over part of issue
*
* To reproduce, run example
* - press down (or any navigation key) to select a row
* - press F2
* - expected: editing started
* - actual: nothing happens
*
*/
public class TableInitialCellEdit extends Application {
ObservableList<MenuItem> data = FXCollections.observableArrayList(
new MenuItem("some"),
new MenuItem("dummy"),
new MenuItem("data")
);
private Parent getContent() {
TableView<MenuItem> table = new TableView<>(data);
table.setEditable(true);
TableColumn<MenuItem, String> text = new TableColumn<>("Text");
text.setCellValueFactory(new PropertyValueFactory<>("text"));
text.setCellFactory(TextFieldTableCell.forTableColumn());
table.getColumns().addAll(text);
return new BorderPane(table);
}
@Override
public void start(Stage primaryStage) throws Exception {
primaryStage.setScene(new Scene(getContent()));
primaryStage.setTitle(VersionInfo.getRuntimeVersion());
primaryStage.show();
}
public static void main(String[] args) {
launch(args);
}
}
- relates to
-
JDK-8267392 ENTER key press on editable TableView throws NPE
-
- Closed
-