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

[MenuButton] Popup opens only at third click

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: P4 P4
    • 8
    • 8
    • javafx
    • jdk1.8.0_b64

      To reproduce
      1. Click on menu button. popup will appear very quickly
      2. Click again. Nothing will happe
      3. Click third time. Now it will open


      import javafx.application.Application;
      import javafx.scene.Scene;
      import javafx.scene.control.MenuButton;
      import javafx.scene.control.MenuItem;
      import javafx.scene.layout.HBox;
      import javafx.stage.Stage;

      public class BugMenuButton extends Application {
          
          @Override
          public void start(Stage primaryStage) {
             
              MenuButton menuButton = new MenuButton("Menu button");
              
              for(int i = 1; i <= 5; i++) {
                menuButton.getItems().add(new MenuItem("Item - " + i));
              }
              
              HBox root = new HBox(20d);
              root.getChildren().add(menuButton);
              
              Scene scene = new Scene(root, 300, 250);
              primaryStage.setScene(scene);
              
              primaryStage.setTitle(System.getProperty("java.runtime.version") + "; " + System.getProperty("javafx.runtime.version"));
              primaryStage.show();
          }

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

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

              Created:
              Updated:
              Resolved:
              Imported: