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