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

Escape key needs to be pressed twice to remove focus from an empty/diabled Menu.

XMLWordPrintable

    • b10
    • x86
    • windows_xp
    • Verified

      Escape key needs to be pressed twice to get focus away from the empty/diabled Menu.
      This is on Windows OS with XP L&F and is reproducible with the swing pit build 7.0 b07.
      Steps to reproduce:
      Compile, and Run the attached test with
      java -Dswing.defaultlaf=com.sun.java.swing.plaf.windows.WindowsLookAndFeel MenuTest
      When the UI comes up observe that the focus is by default on Button1.
      1)Click on BuggyMenu1/BuggyMenu3. Focus moves away from Button1.
      (BuggyMenu1 and BuggyMenu3 are empty menus)
      a) Click escape once.
      Expected behavior
      Focus should move to Button1.
      Actual Behavior
      Nothing Happens
      b)Click Escape again - focus moves to Button1

      2)Now click on BuggyMenu1, Press right arrow to get Disabled Buggymenu2 into focus, Click on BuggyMenu2
      Repeat a) & b) to bserve the incorrect same behavior

      3)Now click on menu named Four, scroll down and then click on BuggyMenu4( this is a submenu).
      Repeat a) & b) to observe same incorrect behavior.

      4)Press Shift +F10 to get the Popup menu. Click on buggy1/buggy2
      Repeat a) & b) to observe same incorrect behavior.

            alexp Alexander Potochkin (Inactive)
            smandalisunw Srinivas Mandalika (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: