aboutsummaryrefslogtreecommitdiffstats
path: root/ui/jquery.ui.dialog.js
diff options
context:
space:
mode:
Diffstat (limited to 'ui/jquery.ui.dialog.js')
-rw-r--r--ui/jquery.ui.dialog.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/ui/jquery.ui.dialog.js b/ui/jquery.ui.dialog.js
index b54cd971f..95b3d28a6 100644
--- a/ui/jquery.ui.dialog.js
+++ b/ui/jquery.ui.dialog.js
@@ -184,10 +184,10 @@ $.widget("ui.dialog", {
first = tabbables.filter( ":first" ),
last = tabbables.filter( ":last" );
- if ( event.target === last[0] && !event.shiftKey ) {
+ if ( ( event.target === last[ 0 ] || event.target === uiDialog[ 0 ] ) && !event.shiftKey ) {
first.focus( 1 );
return false;
- } else if ( event.target === first[0] && event.shiftKey ) {
+ } else if ( ( event.target === first[ 0 ] || event.target === uiDialog[ 0 ] ) && event.shiftKey ) {
last.focus( 1 );
return false;
}