I have several jQueryUI dialogs with Ok
and Cancel
and radio buttons (no text input).
My requirements are:
OK button should be right of the Cancel button and Ok button should be in focus:
- when the dialog opens,
- after any user click or drag.
Requirement no 1 can be implemented by giving the Ok button an id and the following code:
open: function(event, ui) {
$('#OkButton').focus();
},
Requirement no 2 is harder. It could be implemented by defining focusing delegates for a lot of events:
- .ui-dialog-titlebar click
- .ui-dialog-buttonpane click
- dragStop
- etc
But surely there must be a simpler way?