-
Bug
-
Resolution: Fixed
-
P3
-
jfx16
this is JDK-8266969 for TreeCell - to keep scope of the fix bounded by cell type :)
To summarize (treeCell specifics - copied from the blocked issued):
The invariant:
control.edit(editingIndex);
control.setOnEditCancel(e -> assertEquals(editingIndex, e.getIndex()));
must be kept independent of what triggered the cancel. For TreeCell, it is broken on cell re-use (detected while fixingJDK-8265210). It's caused by using the current cell location in the event:
// TreeCell
editingLocation = this.getTreeItem();
fire(new XXEvent(...editingLocation...)
which on re-use is different from the one at the time of starting the edit. Tentative fix is to keep the index (treeItem) at the time of startEdit and use it in the cancelEvent.
To summarize (treeCell specifics - copied from the blocked issued):
The invariant:
control.edit(editingIndex);
control.setOnEditCancel(e -> assertEquals(editingIndex, e.getIndex()));
must be kept independent of what triggered the cancel. For TreeCell, it is broken on cell re-use (detected while fixing
// TreeCell
editingLocation = this.getTreeItem();
fire(new XXEvent(...editingLocation...)
which on re-use is different from the one at the time of starting the edit. Tentative fix is to keep the index (treeItem) at the time of startEdit and use it in the cancelEvent.
- blocks
-
JDK-8266969 All Cells: cancelEvent must return correct editing location
-
- Closed
-
- relates to
-
JDK-8265210 TreeCell: cell editing state not updated on cell re-use
-
- Resolved
-