RFR: 6911375: mouseWheel has no effect without vertical scrollbar [v2]
Alexey Ivanov
aivanov at openjdk.java.net
Tue Mar 1 16:44:11 UTC 2022
On Mon, 28 Feb 2022 07:59:24 GMT, Prasanta Sadhukhan <psadhukhan at openjdk.org> wrote:
>> It is observed that mouseWheel doesn't scroll through a list if there is no scrollbar even though pressing PageUp/Down using keyboard moves up/down the list.
>> Issue stems from the fact that BasicScrollPaneUI.Handler.mouseWheelMoved() skips the mouse wheel events when the scrollbar is not visible.
>> Fixed to handle mouseWheelEvent even though scrollbar is not visible with the assumption that if both vertical and horizontal scrollbar is not visible, then assume default orientation to be vertical.
>>
>> Existing jtreg, jck tests are ok. All L&F works well with the fix and testcase works in all platforms except on mac which will be handled separately.
>
> Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision:
>
> Fix test comments
test/jdk/javax/swing/JScrollPane/TestMouseWheelScroll.java line 48:
> 46: static Point p;
> 47: static int width;
> 48: static int height;
These three should also be volatile, shouldn't they?
test/jdk/javax/swing/JScrollPane/TestMouseWheelScroll.java line 101:
> 99: robot.delay(1000);
> 100: robot.mouseWheel(1);
> 101: robot.delay(500);
You don't call `waitForIdle` or `delay` after the mouse click because it just selects an item but doesn't change the position, right?
-------------
PR: https://git.openjdk.java.net/jdk/pull/7585
More information about the client-libs-dev
mailing list