Hi Semyon, There has already been extensive analysis about this, in the original thread. I'll loop you in that conversation, so that you could suggest the way ahead.
Thanks, Krishna -----Original Message----- From: Semyon Sadetsky Sent: Wednesday, November 8, 2017 11:25 PM To: Krishna Addepalli <krishna.addepa...@oracle.com>; swing-dev@openjdk.java.net; Sergey Bylokhov <sergey.bylok...@oracle.com> Subject: Re: <Swing Dev> [10][JDK-8075084] JOptionPane.showMessageDialog causes JScrollBar to move This fix was already published on Swing alias: http://mail.openjdk.java.net/pipermail/swing-dev/2016-October/006808.html Please continue your discussions in the original thread. --Semyon On 11/08/2017 06:51 AM, Krishna Addepalli wrote: > Any update on this Sergey? > > -----Original Message----- > From: Krishna Addepalli > Sent: Thursday, October 26, 2017 2:13 PM > To: swing-dev@openjdk.java.net; Sergey Bylokhov <sergey.bylok...@oracle.com> > Subject: RE: <Swing Dev> [10][JDK-8075084] JOptionPane.showMessageDialog > causes JScrollBar to move > > Hi Sergey, > > I have recreated the webrev for JDK-10 consolidated repo: > > http://cr.openjdk.java.net/~kaddepalli/8075084/webrev01/ > > Please review and let me know your comments. > > Thanks, > Krishna > > -----Original Message----- > From: Jason Mehrens [mailto:jason_mehr...@hotmail.com] > Sent: Wednesday, August 30, 2017 7:54 PM > To: Krishna Addepalli <krishna.addepa...@oracle.com>; > swing-dev@openjdk.java.net > Subject: Re: <Swing Dev> [10][JDK-8075084] JOptionPane.showMessageDialog > causes JScrollBar to move > > Related bug: > http://mail.openjdk.java.net/pipermail/swing-dev/2014-April/003394.html > > ________________________________________ > From: swing-dev <swing-dev-boun...@openjdk.java.net> on behalf of Krishna > Addepalli <krishna.addepa...@oracle.com> > Sent: Tuesday, August 29, 2017 3:17 AM > To: swing-dev@openjdk.java.net > Subject: Re: <Swing Dev> [10][JDK-8075084] JOptionPane.showMessageDialog > causes JScrollBar to move > > Hi Sergey, > > Can we have the fix pushed in, as per our conversation? > > Thanks, > Krishna > > From: Krishna Addepalli > Sent: Wednesday, July 26, 2017 3:07 PM > To: swing-dev@openjdk.java.net > Cc: Prasanta Sadhukhan <prasanta.sadhuk...@oracle.com>; Sergey Bylokhov > <sergey.bylok...@oracle.com> > Subject: [10][JDK-8075084] JOptionPane.showMessageDialog causes JScrollBar to > move > > Hi All, > > Please review the fix for bug: > > Bug: JDK- 8075084 https://bugs.openjdk.java.net/browse/JDK-8075084 > > JDK 10 Webrev : http://cr.openjdk.java.net/~psadhukhan/8075084/webrev00/ > > Summary: > This is an interesting test case written by Drew Jetter > (http://webbugs.us.oracle.com/IMWeb/incidentReportView.do?incidentID=2688093). > The test shows a vertical scroll bar, and whenever the user clicks on the > arrow buttons, it pops up a message dialog. The moment user clicks on "OK" > button, the movement of the scrollbar doesnot stop, and it keeps showing up > the dialog box again and again, while also moving the scroll bar till it > reaches the end. > > This issue has already been root-caused here : > http://mail.openjdk.java.net/pipermail/swing-dev/2016-November/006938.html , > just reiterating here again: > > The problem is that once a Modal dialog is shown on top of the scrollbar, it > loses focus, and hence doesnot get the mouse release event (which is > swallowed by the DialogBox). For the mouse press event, the scrollbar would > have started a timer, which keeps firing and generating the move events, > which is why the slider moves repeatedly. > > Proposed fix is, once the scroll bar has moved by unit distance, check if it > is still in focus, and only then start the timer. Otherwise *do not* start > the timer, and also set the button press to false. > > PS: This could be a design decision as well, since the use case is not that > common for scrollbar to lose focus on mouse press, so I decided to check out > the behavior in Qt 5.9.1, and found that it too behaves the same way. Of > course it's not binding that Java should behave the same way as Qt, but it > was interesting to know that Qt also had similar behavior. > > Thanks, > Krishna > >