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

MenuButton: selection issue

XMLWordPrintable

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

      Incorrect selection while navigating between menu items. To reproduce:
      - expand drop down menu window by mouse or DOWN arrow key;
      - move the selection pointer to the second item by pushing DOWN key;
      - collapse menu by ESC key or select the second item;
      - expand drop down menu window by mouse or DOWN arrow key;
      - press DOWN arrow key
      Third item will be selected. It seems that the the last selection state is restored.

      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 {
              MenuButton control = new MenuButton("MenuButton");
              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: