Enter, Non-Push-Button, Mac - popposing change

Florian Kirmaier florian.kirmaier at gmail.com
Wed Aug 12 08:25:52 UTC 2020

Hi everyone,

related ticket from the past:

Examples for ButtonTypes:
non-push-buttons: RadioButton, CheckBox
pushButtons: Button, ToggleButton


Consumes EnterEvent    Windows   Mac
PushButton             true      false
NotPushButton          true      false

I propose changing this behavior to the following:

Consumes EnterEvent    Windows   Mac
PushButton             true      true
NotPushButton          false     false

On Windows, the non-push-buttons usually don't work on enter.
They only consume enter by accident because of the changes made, in
So this should be changed, we should probably add a way to distinguish
between push and pushable buttons.

On Mac, I think normal buttons should also consume enter.
The OS-Dialogs don't have the concept focus, so they can't be used as a
On Safari, only TextFields can be focused but buttons can't be focused,
which isn't a real option for JavaFX.
On the other Browsers, they behave the same as Windows (Chrome Firefox).

Proposed Solution:
 - Remove the not-mac-condition whether to decide we want to consume the
 - Make push button distinguishable from other buttons, use it to decide
whether enter consumes the event

 - Focused RadioButtons/Checkboxes etc. no longer block the DefaultButton
 - Behavior would be the same on all Systems
 - Enter on a mac would work again, which is the default on mac on browsers.

I've created a ticket for it:
Any opinions on the topic?

Florian Kirmaier

More information about the openjfx-dev mailing list