On Mon, 6 Mar 2023 21:02:43 GMT, Kevin Rushforth <k...@openjdk.org> wrote:
>> Possible fix for VirtualFlow freeze. >> >> I encountered the problem when experimenting with VirtualFlow. >> >> Guess @johanvos should take a look. >> All tests are still green, so with some luck, this doesn't break anything >> but fixes some known and unknown bugs. > > modules/javafx.controls/src/main/java/javafx/scene/control/skin/VirtualFlow.java > line 1718: > >> 1716: // Finally, update the scroll bars >> 1717: updateScrollBarsAndCells(false); >> 1718: lastPosition = getPosition(); > > This is not a formal review -- I'll let Andy and Johan do that -- but can you > explain why this is the right fix? Presumably there was at least some > reasoning behind updating `lastPosition`. Are there any side effects of not > doing that? I've written more about the explanation below. Actually, it's a good question whether there is reasoning behind updating lastPosition. Wouldn't be surprised, if it is just an artifact of some bug-fixing attempt. ------------- PR: https://git.openjdk.org/jfx/pull/1052