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

Editable ComboBox value update on focus lost is too late

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P4
    • Resolution: Duplicate
    • Affects Version/s: 8u74
    • Fix Version/s: 9
    • Component/s: javafx
    • Labels:
      None

      Description

      Since 8u72 an edited value is also set on focus lost. It looks like a focus listener is internally used to commit the value. However, if a user installs a focus listener to process some value action this listener is called before the value is set (through the focus listener of the control/skin). Means #getValue() fails in this case and returns the old value. The behavior is similar to releases before 8u72 when focus is lost without committing a value by pressing the Enter key.

      One would argue to observe the valueProperty instead. However, there are scenarios where it's required to commit the value before all listeners get notified - i. e. if a user requires value validation triggered on focus lost.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                jgiles Jonathan Giles
                Reporter:
                wzberger Wolfgang Zitzelsberger
              • Votes:
                1 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: