On Wed, 7 Aug 2024 13:52:07 GMT, Prasanta Sadhukhan <[email protected]> wrote:
>> Issue is >> BasicScrollBarUI.ArrowButtonListener starts a timer in mousePressed(), and >> stops it in mouseReleased(). If the frame containing the scrollbar is >> disabled between the MOUSE_PRESSED and the MOUSE_RELEASED events, the >> mouseReleased() method is never called. If the frame is then re-enabled, the >> still-running timer causes it to scroll all the way to the end. >> Fix is to check if >> [ArrowButtonListener.handledEvent](https://github.com/openjdk/jdk/blame/ee839b7f0ebe471d3877cddd2c87019ccb8ee5ae/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicScrollBarUI.java#L1567) >> is still set when ActionEvent is processed then stop the timer and reset >> this variable. >> >> CI testing is green and also SwingSet2 JScrollPane scrolling with this >> modification.. > > Prasanta Sadhukhan has updated the pull request incrementally with two > additional commits since the last revision: > > - copyright > - Restore AquaL&F testing @prsadhuk I was verifying the test and for Aqua L&F looks like the timer is not stopped and scrollbar scrolls down to the end and it doesn't throw any exception also. Test ran fine for Metal, Nimbus and Motif L&Fs. ------------- PR Comment: https://git.openjdk.org/jdk/pull/20346#issuecomment-2277262463
