Comment 3 for bug 1197659

Revision history for this message
Tim Bentley (trb143) wrote :

If you set the focus to the button you cannot edit but then when you press enter the delete still runs.
The problem is in the setting of default and autodefault

Default property

If this is set true, the button will be a default button.
If Enter is pressed on the dialog, than this button will be pressed, except when the focus is on an autoDefault button.

There should be only one default button. If you add more then the last one added will be the default button.

AutoDefault property

If this is set true, the button will be an autoDefault button.
If Enter is pressed on the dialog, than this button will be pressed if the focus is on it.

If the focus is not on an autoDefault button and there is no default button than the next autoDefault button will be pressed for Enter.

I propose we use setDefault. When save is enabled that has default otherwise delete has default.