[TreeView] Cmd + Home doesn't move focus to the first item.

XMLWordPrintable

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

      jdk1.8.0_b66

      I tried this on Windows keyboard because it has 'Home' button (using Win key instead of Cmd)

      To reproduce click at any item in the middle of control
      and then push Cmd+Home.
      You will see that the focused item remains the same.

      public void start(Stage primaryStage) {
              
              TreeItem root = new TreeItem("Root");
              TreeView treeView = new TreeView(root);
              treeView.getSelectionModel().setSelectionMode(SelectionMode.MULTIPLE);
              
              for (int i = 0; i < 15; i++) {
                  root.getChildren().add(new TreeItem("item - " + i));
              }
              
              HBox container = new HBox();
              container.setMaxSize(100, 150);
              container.getChildren().add(treeView);
              
              Scene scene = new Scene(container, 300, 250);
              
              primaryStage.setTitle(VersionInfo.getRuntimeVersion());
              primaryStage.setScene(scene);
              primaryStage.show();
          }

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

              Created:
              Updated:
              Resolved:
              Imported: