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.
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.
- duplicates
-
JDK-8150946 Editable ComboBox / Spinner controls need uniform 'commit on focus lost' semantics
- Resolved
- relates to
-
JDK-8136838 [ComboBox, DatePicker] Value doesn't update when focus is lost
- Resolved
-
JDK-8191995 Regression: DatePicker must commit on focusLost
- Resolved
-
JDK-8151087 Editable ComboBox CCE
- Closed