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

HelloComboBox can get stuck.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: P4 P4
    • 8u40
    • 8
    • javafx

      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 it RT-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 in RT-21088.
                          Platform.runLater(new Runnable() {
                              @Override public void run() {
                                  comboBox.requestFocus();
                              }
                          });
                      }

            jgiles Jonathan Giles
            kwwong Kinsley Wong (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: