aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
Diffstat (limited to 'ui')
-rw-r--r--ui/jquery.ui.dialog.js9
1 files changed, 3 insertions, 6 deletions
diff --git a/ui/jquery.ui.dialog.js b/ui/jquery.ui.dialog.js
index df896e7ea..ae96b2d8b 100644
--- a/ui/jquery.ui.dialog.js
+++ b/ui/jquery.ui.dialog.js
@@ -324,12 +324,9 @@ $.widget("ui.dialog", {
// 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)
- .filter(':first')
- .focus();
+ $(self.element.find(':tabbable').get().concat(
+ uiDialog.find('.ui-dialog-buttonpane :tabbable').get().concat(
+ uiDialog.get()))).eq(0).focus();
self._trigger('open');
self._isOpen = true;