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

[ComboBox] Keypress does not move selection or allow text entry when editable

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P2
    • Resolution: Fixed
    • Affects Version/s: 8u20
    • Fix Version/s: 8u20
    • Component/s: javafx

      Description

      ComboBox does not move selection to matching prefix item on keypress.
      If ComboBox is editable, you have to use a mouse click in order to type in the textfield.

         @Override public void start(Stage stage) throws Exception {
              HBox root = new HBox();
              root.setFillHeight(false);
              Scene scene = new Scene(root, 850, 550);
              stage.setScene(scene);
              stage.setTitle("Messages Sample");

              TextField textField = new TextField();
              ComboBox<String> comboBox = new ComboBox<>();
      // comboBox.getItems().addAll("One", "Two", "Three");
              comboBox.setEditable(true);

              root.getChildren().addAll(textField, comboBox);

              stage.show();
          }

        Attachments

          Activity

            People

            Assignee:
            jgiles Jonathan Giles
            Reporter:
            dgrieve David Grieve
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Imported: