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

SplitMenuButton: incorrect selection of the first menu item

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P4 P4
    • tbd
    • 9
    • javafx
    • None
    • b129, Win7

      First menu item is selected if the drop down menu is expanded first time. To reproduce:
      - expand drop down menu using mouse
      First menu item will be selected unexpectedly. Note that there is no selection at the next attempt.

      Sample to check:

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

      public class App extends Application {

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

          @Override
          public void start(Stage stage) throws Exception {
              SplitMenuButton control = new SplitMenuButton();
              control.setText("Split Button");
              for (int i = 0; i < 5; i++) {
                  control.getItems().add(new MenuItem("Item " + String.valueOf(i + 1)));
              }
              Scene scene = new Scene(new HBox(control));
              stage.setScene(scene);
              stage.show();
          }
      }

            Unassigned Unassigned
            ogb Oleg Barbashov (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: