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

Menu mnemonics 'stick' on Windows 7

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Not an Issue
    • Affects Version/s: 7u15
    • Fix Version/s: 8
    • Component/s: javafx

      Description

      Mnemonics is "sticking" on with ALT key presses on Windows 7.

      Simple example:

      import javafx.application.Application;
      import javafx.scene.Group;
      import javafx.scene.Scene;
      import javafx.scene.control.Menu;
      import javafx.scene.control.MenuBar;
      import javafx.scene.control.MenuItem;
      import javafx.stage.Stage;

      public class MenuBug extends Application
      {
      public static void main(String[] args)
      {
      launch(args);
      }

      @Override
      public void start(final Stage primaryStage)
      {
      primaryStage.setTitle("bug");
      Group root = new Group();

      MenuBar mb = new MenuBar();
      Menu file = new Menu("_File");
      MenuItem foo = new MenuItem("foo");

      file.setMnemonicParsing(true);
      file.getItems().add(foo);

      mb.getMenus().add(file);

      root.getChildren().add(mb);
      mb.prefWidthProperty().bind(primaryStage.widthProperty());
      primaryStage.setScene(new Scene(root, 200, 200));
      primaryStage.show();
      }
      }


      On Windows 7, if you press and hold the ALT key, the mnemonic underlines appear, as you would expect. When you release the ALT key - it does not disappear. The next time you press the letter F, (without the ALT key being down) the file menu appears.

      I cannot reproduce this behavior on Linux - it works as expected there.

      I've tested this on Linux (64 bit) - doesn't happen. Windows XP - 32 bit - doesn't happen.
      Windows 7 - 64 bit - happens.

      All with the 1.7.0_17 java release.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                miflemi Mick Fleming (Inactive)
                Reporter:
                vortexjfx vortex (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Due:
                  Created:
                  Updated:
                  Resolved:
                  Imported: