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

Clicking on a ComboBox no longer transfers focus to the ComboBox

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 8u20
    • 8u20
    • javafx
    • Java 8u20 latest build on Linux

      I just noticed that with latest 8u20 builds that clicking on a ComboBox no longer transfers focus to that combobox.

      To reproduce Run the provided test class:

      1. The stage should appear with focus in the text field.

      2. Click on the combobox to change its value and notice that it doesn't receive focus.


      ****************************************** Test Class ******************************************************
      import javafx.application.Application;
      import javafx.scene.Scene;
      import javafx.scene.control.ComboBox;
      import javafx.scene.control.TextField;
      import javafx.scene.layout.HBox;
      import javafx.scene.layout.Region;
      import javafx.scene.layout.StackPane;
      import javafx.stage.Stage;

      public class ComboBoxTest extends Application {

         @Override public void start(final Stage primaryStage) throws Exception {

            TextField field = new TextField();
            ComboBox<String> combo = new ComboBox<>();
            combo.getItems().setAll("one", "two", "three");
             
            primaryStage.centerOnScreen();
            primaryStage.setHeight(350);
            primaryStage.setWidth(500);
            
            HBox box = new HBox(20, field, combo);
            box.setMaxSize(Region.USE_PREF_SIZE, Region.USE_PREF_SIZE);
            primaryStage.setScene(new Scene(new StackPane(box)));

            primaryStage.show();

         }

         public static void main(String[] args) throws Exception {
            launch(args);
         }

      }

            jgiles Jonathan Giles
            csmithjfx Charles Smith (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: