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

[MenuButton] Popup opens only at third click

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Cannot Reproduce
    • Affects Version/s: 8
    • Fix Version/s: 8
    • Component/s: javafx
    • Labels:
    • Environment:

      jdk1.8.0_b64

      Description

      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);
          }
      }

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved:
                Imported: