On Wed, 10 Jan 2024 12:31:20 GMT, Florian Kirmaier <fkirma...@openjdk.org> wrote:
> As seen in the unit test of the PR, when we click on the area above/below the > scrollbar the position jumps - but the jump is now not always consistent. > In the current version on the last cell - the UI always jumps to the top. In > the other cases, the assumed default cell height is used. > > With this PR, always the default cell height is used, to determine how much > is scrolled. > This makes the behavior more consistent. > > Especially from the unit-test, it's clear that with this PR the behavior is > much more consistent. > > This is also related to the following PR: > https://github.com/openjdk/jfx/pull/1194 Tested on macOS 14.1.2 with ListView, fixed and variable cell height, using MonkeyTester https://github.com/andy-goryachev-oracle/MonkeyTest I do see two problems: 1. With variable height cells: if I click below the scrollbar thumb, followed by a click above the thumb, I expect the view to go back to the same position exactly, but it does not (see the screenshots). I think I've mentioned this problem before in some other PR. initial condition:  clicked below the thumb:  clicked above the thumb:  2. this one is more serious. sometimes it gets into state when clicking below the thumb does not move the scroll bar at all, here is the screenshot:  It seems to happen when the cell height exceeds the viewport height AND the cell is positioned exactly at the top of the viewport. Can you see it? modules/javafx.controls/src/main/java/javafx/scene/control/skin/VirtualFlow.java line 1548: > 1546: > 1547: // will return true if scroll is successful > 1548: private boolean tryScrollOneCell(int targetIndex, boolean downOrRight) { please revert indentation change ------------- PR Comment: https://git.openjdk.org/jfx/pull/1326#issuecomment-1890149894 PR Review Comment: https://git.openjdk.org/jfx/pull/1326#discussion_r1451024141