diff --git a/src/main/java/org/fxmisc/flowless/Navigator.java b/src/main/java/org/fxmisc/flowless/Navigator.java index 90eabf7..a8e4c45 100644 --- a/src/main/java/org/fxmisc/flowless/Navigator.java +++ b/src/main/java/org/fxmisc/flowless/Navigator.java @@ -301,9 +301,9 @@ private int fillBackwardFrom(int itemIndex, double upTo) { return fillBackwardFrom0(itemIndex, upTo); } - // does not re-place the anchor cell + // Does replace the anchor cell, otherwise it's not included in ListModification events (see RichTextFX/issues/998) int fillBackwardFrom0(int itemIndex, double upTo) { - double min = orientation.minY(positioner.getVisibleCell(itemIndex)); + double min = orientation.minY(positioner.getVisibleCell(itemIndex))-1.0; int i = itemIndex; while(min > upTo && i > 0) { --i;