JDK-8033069 : mouse wheel scroll closes combobox popup
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 7u45
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2014-01-29
  • Updated: 2016-05-10
  • Resolved: 2015-05-14
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 7 JDK 8 JDK 9
7u91Fixed 8u60Fixed 9 b68Fixed
Related Reports
Relates :  
Description
I have a combo box with a list of items. When I open the combo box popup and try to scroll using the mouse wheel (my mouse pointer is on the combo box and not on the combo box popup), the popup gets closed. If the combo box popup has a vertical scroll bar and then if the mouse pointer is inside the popup and if I try to scroll using mouse wheel, it works fine: the popup doesn't get closed. However if the popup doesn't have a vertical scroll bar (ie., less items say 4-5 items) and then even if the mouse pointer is inside the popup, on wheel scrolling the popup hides.

This issue is somewhat related to http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=7141296 but not completely fixed even in latest JDK7_45.
Comments
Code review thread: http://mail.openjdk.java.net/pipermail/swing-dev/2015-May/004475.html
19-05-2015

Root cause analysis: There are several different cases and all of them boil down to: if MOUSE_WHEEL is consumed by ComboBox, the popup won't close. 1. If you rotate mouse wheel on ComboBox rather than the popup, the source of MOUSE_WHEEL is JComboBox. When the even is handled, BasicPopupMenuUI.isInPopup returns false in this case and the popup is closed. 2. If you rotate mouse wheel on the popup, the source of MOUSE_WHEEL is JScrollPane. BasicPopupMenuUI.isInPopup return true and the popup stays open. Yet another MOUSE_WHEEL immediately follows that one which has javax.swing.Popup$HeavyWeightWindow as its source. When this event reaches BasicPopupMenuUI, isInPopup returns false and the popup gets closed. The latter MOUSE_WHEEL is "generated", or retargeted, because the former event wasn't consumed.
22-04-2015

- this is an issue reported against 7(7u), - there are now affected version 9 filed for this issue - 7u issues are transferred to Sustaining Nevertheless if someone have a report against 9 - please reopen and add affectedVersion 9 or 7u specific escalations might be reopen to Sustaining
10-08-2014

sust assignment in accordance with bugDB
29-01-2014