This is very hard to reproduce. Run HelloComboBox and cover it with another window. Then after a few seconds bring HelloComboBox to the foreground and use your mouse to randomly select comboboxes. After a while HelloComboBox will be stuck.
I traced the problem to here and after talking to Kevin this is the jira causing itRT-20656
ComboBoxListViewSkin.java
textField.focusedProperty().addListener(new ChangeListener<Boolean>() {
@Override public void changed(ObservableValue<? extends Boolean> ov, Boolean t, Boolean hasFocus) {
if (hasFocus) {
// Using Platform.runLater here, as without it it seems we
// enter into some form of race condition where we are
// wanting to set focus on the comboBox whilst the textField
// is still notifying of its focus gain.
// This issue was identified inRT-21088.
Platform.runLater(new Runnable() {
@Override public void run() {
comboBox.requestFocus();
}
});
}
I traced the problem to here and after talking to Kevin this is the jira causing it
ComboBoxListViewSkin.java
textField.focusedProperty().addListener(new ChangeListener<Boolean>() {
@Override public void changed(ObservableValue<? extends Boolean> ov, Boolean t, Boolean hasFocus) {
if (hasFocus) {
// Using Platform.runLater here, as without it it seems we
// enter into some form of race condition where we are
// wanting to set focus on the comboBox whilst the textField
// is still notifying of its focus gain.
// This issue was identified in
Platform.runLater(new Runnable() {
@Override public void run() {
comboBox.requestFocus();
}
});
}
- relates to
-
JDK-8127120 Pending requests from Application.invokeLater can cause input event starvation
-
- Closed
-