Enhancement
(User-visible)
If Enter is pressed in a dialog, the "Default" action should be executed.
In the following, "Enter" always means "Return".
Improvement
A "Default" action has been defined for each dialog. This is usually the button labeled "Save", "Yes" or "OK".
Code migration
- Caller of MessageBox.confirm or MessageBox.confirmDialog:
- The first button (i.e. CommandModel) is used as the default action: If a user presses "Enter" this button is triggered. Therefore, the callers should be adjusted so that the order of the buttons corresponds to this.
- If a tl:DialogModel is created, setDefaultCommand(Command) should then be used to specify what should be executed when "Enter" is pressed.
Delimitation
If a UI element within the dialog already has the focus and reacts to Enter, this does not change. If, for example, a checkbox in the dialog has the focus and Enter is pressed, it is checked and the default action of the dialog is not executed.
Test
In dialogs, check whether they react appropriately to Enter if the focus is not on an element with its own Enter behaviour.