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

[macos] Context Menus don't work in Swing on OS X

    XMLWordPrintable

Details

    Description

      FULL PRODUCT VERSION :
      java version "1.8.0_131"
      Java(TM) SE Runtime Environment (build 1.8.0_131-b11)
      Java HotSpot(TM) 64-Bit Server VM (build 25.131-b11, mixed mode)


      ADDITIONAL OS VERSION INFORMATION :
      macOS Sierra version 10.12.4

      EXTRA RELEVANT SYSTEM CONFIGURATION :
      MacBook Pro Retina

      A DESCRIPTION OF THE PROBLEM :
      Starting with 1.8.0_121 context menus in NetBeans stopped working when using the right-click gestures on the touchpad. The main gesture is two-finger-tap + click. The contextmenu opens and immediately closes again. Here's a video illustrating the problem:

      https://www.youtube.com/watch?v=Swm-1AHRtBs&feature=youtu.be

      As you can see in the video, right after the click, there's a scroll event. Sometimes it's horizontal, sometimes vertical. I made the projects window smaller, so it's easier to see the scrolling.

      I tried u_121 and u_131. Both versions have this issue, while u_112 works fine. I've verified that this problem also affects others, as I've been asked by a couple of users at a recent conference how to solve this problem. This issue actually made me look like an idiot during my presentation ;-).

      I assume it's a general Swing problem related to this bug fix:
      https://bugs.openjdk.java.net/browse/JDK-8166591

      REGRESSION. Last worked in version 8u112

      ADDITIONAL REGRESSION INFORMATION:
      java version "1.8.0_112"
      Java(TM) SE Runtime Environment (build 1.8.0_112-b16)
      Java HotSpot(TM) 64-Bit Server VM (build 25.112-b16, mixed mode)

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Install NetBeans 8.2 and run on OS X MacBook Prop Retina (don't know if it only affects retina). Go to Projects Menu and right-click one of the projects.

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      The context menu should open and stay open.
      ACTUAL -
      The context menu opens and shuts down immediately. Also if scrollbars are visible, the view scrolls a tiny bit.

      REPRODUCIBILITY :
      This bug can be reproduced always.

      CUSTOMER SUBMITTED WORKAROUND :
      Use a mouse (which is very uncomfortable for anyone used to work without a mouse)

      Attachments

        Issue Links

          Activity

            People

              aniyogi Avik Niyogi (Inactive)
              webbuggrp Webbug Group
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: