-
Bug
-
Resolution: Unresolved
-
P4
-
jfx17
when starting edit with space, editor content is replaced by " " (= space), happens only if the cell has been in editing state before
Seen for ListView, Tree/TableView (not TreeView which doesn't seem to have a binding of space to activate?).
Might be similar as the second part ofJDK-8089020 (though in that issue it seems to have happened always).
Reproducible (haven't checked others): fx11, fx17, current fx18dev
To reproduce, run the example
- start/terminate edit on a cell (doesn't matter by which means)
- start edit on the same cell by space
- expected: editor contains the item at the index
- actual: editor contains a single (unselected) space
Example code:
public class ListTextFieldStartEdit extends Application {
int count;
private Parent createContent() {
ObservableList<String> items = FXCollections.observableArrayList(
Stream.generate(() -> "item" + count++)
.limit(50)
.collect(Collectors.toList()));
ListView<String> list = new ListView<>(items);
list.setEditable(true);
list.setCellFactory(TextFieldListCell.forListView());
VBox content = new VBox(10, list);
return content;
}
@Override
public void start(Stage stage) throws Exception {
stage.setScene(new Scene(createContent()));
stage.show();
}
public static void main(String[] args) {
launch(args);
}
}
Seen for ListView, Tree/TableView (not TreeView which doesn't seem to have a binding of space to activate?).
Might be similar as the second part of
Reproducible (haven't checked others): fx11, fx17, current fx18dev
To reproduce, run the example
- start/terminate edit on a cell (doesn't matter by which means)
- start edit on the same cell by space
- expected: editor contains the item at the index
- actual: editor contains a single (unselected) space
Example code:
public class ListTextFieldStartEdit extends Application {
int count;
private Parent createContent() {
ObservableList<String> items = FXCollections.observableArrayList(
Stream.generate(() -> "item" + count++)
.limit(50)
.collect(Collectors.toList()));
ListView<String> list = new ListView<>(items);
list.setEditable(true);
list.setCellFactory(TextFieldListCell.forListView());
VBox content = new VBox(10, list);
return content;
}
@Override
public void start(Stage stage) throws Exception {
stage.setScene(new Scene(createContent()));
stage.show();
}
public static void main(String[] args) {
launch(args);
}
}
- relates to
-
JDK-8089020 TextFieldTableCell flickers when edit is activated with enter key
-
- Closed
-