mirror of
https://github.com/jquery/jquery-ui.git
synced 2026-04-20 03:02:41 -04:00
Dialog: Prevent tabbing off any dialog. Fixes #3768 - Dialog: contain focus within dialog.
This commit is contained in:
committed by
Jörn Zaefferer
parent
14691ae6fe
commit
3a09a4a0de
4
ui/jquery.ui.dialog.js
vendored
4
ui/jquery.ui.dialog.js
vendored
@@ -174,9 +174,9 @@ $.widget("ui.dialog", {
|
||||
uiDialog.bgiframe();
|
||||
}
|
||||
|
||||
// prevent tabbing out of modal dialogs
|
||||
// prevent tabbing out of dialogs
|
||||
this._on( uiDialog, { keydown: function( event ) {
|
||||
if ( !options.modal || event.keyCode !== $.ui.keyCode.TAB ) {
|
||||
if ( event.keyCode !== $.ui.keyCode.TAB ) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user