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

Reply via email to