On 06/14/2017 09:54 PM, Prasanta Sadhukhan wrote:
Hi Semyon,
I tried on Firefox and other app. If popup or drop down menu is
opened, then mouse wheel rotation is not closing the popups. In our
case, it is closing the popups/menus.
That is true. I meant you fixed only the case when the mouse wheel
rotation is over java windows (wheel event's source != null). What will
be if the wheel is rotated outside java (source == null), or it is not
the case?
--Semyon
Regards
Prasanta
On 6/14/2017 8:26 PM, Semyon Sadetsky wrote:
Hi Prasanta,
I may be wrong, but it seems to me that the standard behavior is when
any wheel event cannot close popups.
--Semyon
On 06/13/2017 10:39 PM, Prasanta Sadhukhan wrote:
Hi All,
Please review a fix for an issue whereby it is seen
hitting the scroll wheel by accident closes whole structure of
context menus causing it to disappear and the user has to invoke the
menu again.
Issue was popupMenu is getting closed for mouse wheel rotation if
the menu is not from JComboBox.
If the context menu is opened from JMenuItem, JMenu then if the
mouse wheel is rotated anywhere in frame, then it calls
cancelPopupMenu() causing it to call setVisible(false) and so menu
disappears.
Proposed fix is to check if the mouse wheel rotation is done in
JMenu, JMenuItem or anywhere in frame, then if popup is present,
then do not close the popupmenu.
Bug: https://bugs.openjdk.java.net/browse/JDK-8075063
webrev: http://cr.openjdk.java.net/~psadhukhan/8075063/webrev.00/
Regards
Prasanta