Hi all,

Please review my addition of 'commitValue' / 'cancelEdit' APIs to Spinner and ComboBox. These APIs mirror the API on TextInputControl, and allows for the controls (rather than their skins) to properly commit on focus loss.

Previously committing on focus loss was handled by the control skins, but because these skins were created after the control was shown in a Scene, it was possible (and highly probable) that other listeners would be installed on the control before the 'commit-on-focus-loss' listener was installed. This would result in situations where listeners got the old data.

By adding these additional two methods to Spinner and ComboBox, we can prevent this by being the first listener in the queue.

I should note that cancelEdit() is not required for this particular fix, but it seemed appropriate to consider its introduction at the same time as commitValue().

Jira issue: https://bugs.openjdk.java.net/browse/JDK-8150946
Webrev: http://cr.openjdk.java.net/~jgiles/8150946/

--


-- Jonathan

Reply via email to