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

Menu's selection disappears on collapsing

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P4
    • 10
    • None
    • javafx

    Description

      Extracted from JDK-8164979.

      To reproduce:
      - expand menu by mouse;
      -collapse menu by mouse
      The selection mark disappears unexpectedly.

      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 {
              MenuBar control = new MenuBar();
              for (int i = 0; i < 5; i++) {
                  Menu m = new Menu("Menu " + String.valueOf(i + 1));
                  for (int j = 0; j < 5; j++) {
                      m.getItems().add(new MenuItem("Item " + String.valueOf(j + 1)));
                  }
                  control.getMenus().add(m);
              }
              Scene scene = new Scene(new HBox(control));
              stage.setScene(scene);
              stage.show();
          }
      }

      Attachments

        1. Before.png
          Before.png
          81 kB
        2. After.png
          After.png
          86 kB

        Issue Links

          Activity

            People

              pkbalakr Prem Balakrishnan (Inactive)
              jgiles Jonathan Giles
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: