JFXtras / jfxtras

A supporting library for JavaFX, containing helper classes, extended layouts, controls and other interesting widgets.
http://jfxtras.org
Other
599 stars 123 forks source link

CalendarTimeTextField doesn't seem to recognize default button #89

Closed nils-christian closed 3 years ago

nils-christian commented 6 years ago

Hi,

For a start: Thank you for what you are doing and for providing us with jfxtras.

Now about my issue. It seems to me that the CalendarTimeTextField (maybe some other components as well) do not recognize my default button. I have a search mask in my view with multiple text fields (javafx.scene.control.TextField), some CalendarTimeTextFields, and a search button which is marked as the default button. When one of the textfields has the focus and I press "Enter", the search action is performed. However, when one of the CalendarTimeTextFields has the focus, the action is not performed.

My current workaround is to register the event explicitly for the CalendarTimeTextFields:

ivFilterLowerTime.setOnKeyReleased( e -> {
  if ( e.getCode( ) == KeyCode.ENTER ) {
    getController( ).performSearch( );
  }
} );

This works. However, I wonder whether there is a reason why the CalendarTimeTextFields do not accept the default button. Is this on purpose or is there a defect? I am currently using Version 8.0-r5 of your library.

Thank you and best regards,

Nils

tbee commented 6 years ago

Interesting question. I'm currently a bit busy, but when I have time I'll take a look.

tbee commented 3 years ago

Okay. It may take a bit... Ahem, but... 11-r3-SNAPSHOT has default button support.