diff options
author | Jörn Zaefferer <joern.zaefferer@gmail.com> | 2012-10-23 10:47:59 -0400 |
---|---|---|
committer | Jörn Zaefferer <joern.zaefferer@gmail.com> | 2012-10-24 17:03:00 -0400 |
commit | 513b6da641941a54d17880e75d7558b53650f62f (patch) | |
tree | 8e4f854e05588d8b36c5602aadaecd8ed6089656 /ui/jquery.ui.dialog.js | |
parent | 3a09a4a0de1f485a63091ffe8188b080a561b592 (diff) | |
download | jquery-ui-513b6da641941a54d17880e75d7558b53650f62f.tar.gz jquery-ui-513b6da641941a54d17880e75d7558b53650f62f.zip |
Dialog: Keep focus inside dialog, even when dialog itself has focus.
Diffstat (limited to 'ui/jquery.ui.dialog.js')
-rw-r--r-- | ui/jquery.ui.dialog.js | 4 |
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; } |