Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8033069

mouse wheel scroll closes combobox popup

    Details

      Backports

        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.

          Issue Links

            Activity

            Hide
            vdyakov Victor Dyakov added a comment -
            sust assignment in accordance with bugDB
            Show
            vdyakov Victor Dyakov added a comment - sust assignment in accordance with bugDB
            Hide
            vdyakov Victor Dyakov added a comment -
             - 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
            Show
            vdyakov Victor Dyakov added a comment -  - 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
            Hide
            aivanov Alexey Ivanov added a comment -
            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.
            Show
            aivanov Alexey Ivanov added a comment - 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.
            Hide
            hgupdate HG Updates added a comment -
            URL: http://hg.openjdk.java.net/jdk9/client/jdk/rev/37420463e70c
            User: alitvinov
            Date: 2015-05-14 15:26:09 +0000
            Show
            hgupdate HG Updates added a comment - URL: http://hg.openjdk.java.net/jdk9/client/jdk/rev/37420463e70c User: alitvinov Date: 2015-05-14 15:26:09 +0000
            Show
            aivanov Alexey Ivanov added a comment - Code review thread: http://mail.openjdk.java.net/pipermail/swing-dev/2015-May/004475.html
            Hide
            hgupdate HG Updates added a comment -
            URL: http://hg.openjdk.java.net/jdk9/jdk9/jdk/rev/37420463e70c
            User: lana
            Date: 2015-06-10 21:24:34 +0000
            Show
            hgupdate HG Updates added a comment - URL: http://hg.openjdk.java.net/jdk9/jdk9/jdk/rev/37420463e70c User: lana Date: 2015-06-10 21:24:34 +0000

              People

              • Assignee:
                aivanov Alexey Ivanov
                Reporter:
                asaha Abhijit Saha
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: