User feedback:
Undoing a style only change fires a change event where ContentChange.isEdit is true when it should be false.
The failure can be tested with the following unit test:
@Test
public void undoStyleChange() {
ArrayList<ContentChange> changes = new ArrayList<>();
TextPos p = control.appendText("BOLD");
control.getModel().addListener((ch) -> {
changes.add(ch);
});
control.applyStyle(TextPos.ZERO, p, BOLD);
control.undo();
assertEquals(2, changes.size());
ContentChange ch1 = changes.get(0);
assertFalse(ch1.isEdit());
ContentChange ch2 = changes.get(1);
assertFalse(ch2.isEdit());
}
Undoing a style only change fires a change event where ContentChange.isEdit is true when it should be false.
The failure can be tested with the following unit test:
@Test
public void undoStyleChange() {
ArrayList<ContentChange> changes = new ArrayList<>();
TextPos p = control.appendText("BOLD");
control.getModel().addListener((ch) -> {
changes.add(ch);
});
control.applyStyle(TextPos.ZERO, p, BOLD);
control.undo();
assertEquals(2, changes.size());
ContentChange ch1 = changes.get(0);
assertFalse(ch1.isEdit());
ContentChange ch2 = changes.get(1);
assertFalse(ch2.isEdit());
}
- is blocked by
-
JDK-8366201 RichTextArea: remove allowUndo parameter
-
- In Progress
-
- relates to
-
JDK-8351982 ☂ RichTextArea (Incubator) Feedback and Bugs in jfx24
-
- Open
-