Skip to content
Permalink
Browse files

Dialog: Keep focus inside dialog, even when dialog itself has focus.

  • Loading branch information...
jzaefferer committed Oct 23, 2012
1 parent 3a09a4a commit 513b6da641941a54d17880e75d7558b53650f62f
Showing with 2 additions and 2 deletions.
  1. +2 −2 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;
}

0 comments on commit 513b6da

Please sign in to comment.
You can’t perform that action at this time.