diff options
-rw-r--r-- | ui/ui.dialog.js | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/ui/ui.dialog.js b/ui/ui.dialog.js index f6cd5ac20..4cec0f7f3 100644 --- a/ui/ui.dialog.js +++ b/ui/ui.dialog.js @@ -230,14 +230,12 @@ $.widget("ui.dialog", { } })); - // set focus to the first tabbable element in: - // - content area - // - button pane - // - title bar + // set focus to the first tabbable element in the content area or the first button + // if there are no tabbable elements, set focus on the dialog itself $([]) .add(uiDialog.find('.ui-dialog-content :tabbable:first')) .add(uiDialog.find('.ui-dialog-buttonpane :tabbable:first')) - .add(uiDialog.find('.ui-dialog-titlebar :tabbable:first')) + .add(uiDialog) .filter(':first') .focus(); |