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

Context menu key is not working on linux.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P4 P4
    • tbd
    • 8
    • javafx
    • jdk1.8.0b76

      Context menu key had the behavior similar to right-click but now there is no reaction.

      To reproduce: right-click on the button. Context menu will appear. This will be the expected result.
      Then push Context menu button and nothing will happen.

      public class MenuItemTest extends Application {
          
          @Override
          public void start(Stage primaryStage) {
              
              Parent root = createScene();
              
              Scene scene = new Scene(root, 300, 250);
              
              primaryStage.setTitle(VersionInfo.getRuntimeVersion());
              primaryStage.setScene(scene);
              primaryStage.show();
          }

          public static void main(String[] args) {
              launch(args);
          }

          private Parent createScene() {
              
              ContextMenu menu = new ContextMenu();
              
              for (int i = 0; i < 10; i++) {
                  MenuItem menuItem = new MenuItem("Item - 0x1" + i);
                  menu.getItems().add(menuItem);
              }
              
              
              Button btn = new Button("Button");
              btn.setContextMenu(menu);
              
              HBox root = new HBox(5);
              root.getChildren().add(btn);
              
              return root;
          }
      }

            Unassigned Unassigned
            dzinkevi Dmitry Zinkevich (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Imported: