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

Regression: left/right keys not working in editor of comboBox if popup showing

    XMLWordPrintable

    Details

      Description

      To reproduce, run the example below
      - open popup
      - type some text into the field (or select by up/down from list)
      - type right/left key
      - expected: cursor moved one char right/left
      - actual: cursor not moved

      Was working as expected in fx8, is not working in fx10 (and probably not in fx9, didn't check).

      In addition, ctrl-A has no effect (that is it's not possible to select all text in the editor) - which is not a regression, isn't working in fx8 as well as in fx10. This misbehaviour came up at SO https://stackoverflow.com/q/51943654/203657

      public class ComboTextFieldNavigation extends Application {
          
          @Override
          public void start(Stage stage) {
              HBox root = new HBox();

              ObservableList<String> items = FXCollections.observableArrayList(
                      "One", "Two", "Three", "Four", "Five", "Six",
                      "Seven", "Eight", "Nine", "Ten");
              ComboBox<String> cb = new ComboBox<String>(items);
              cb.setEditable(true);
              root.getChildren().addAll(cb);

              Scene scene = new Scene(root);
              stage.setScene(scene);
              stage.show();
          }

          public static void main(String[] args) {
              launch();
          }
          
          @SuppressWarnings("unused")
          private static final Logger LOG = Logger
                  .getLogger(ComboTextFieldNavigation.class.getName());
      }

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                arapte Ambarish Rapte
                Reporter:
                fastegal Jeanette Winzenburg
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated: