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

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

    XMLWordPrintable

    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_b66

      Description

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

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                Due:
                Created:
                Updated:
                Resolved:
                Imported: