mirror of
https://github.com/jquery/jquery-ui.git
synced 2025-01-07 20:34:24 +00:00
Dialog: Update to 96e5c24
- keyup apparently doesn't work like I thought it would everywhere, switching back to keydown.
(cherry picked from commit dfe75e1b55
)
This commit is contained in:
parent
8f16cc304a
commit
5d4d40f7be
@ -14,7 +14,7 @@ asyncTest( "#3123: Prevent tabbing out of modal dialogs", function() {
|
|||||||
|
|
||||||
inputs.eq( 1 ).focus();
|
inputs.eq( 1 ).focus();
|
||||||
equal( document.activeElement, inputs[1], "Focus set on second input" );
|
equal( document.activeElement, inputs[1], "Focus set on second input" );
|
||||||
inputs.eq( 1 ).simulate( "keyup", { keyCode: $.ui.keyCode.TAB });
|
inputs.eq( 1 ).simulate( "keydown", { keyCode: $.ui.keyCode.TAB });
|
||||||
|
|
||||||
setTimeout( checkTab, 2 );
|
setTimeout( checkTab, 2 );
|
||||||
|
|
||||||
|
2
ui/jquery.ui.dialog.js
vendored
2
ui/jquery.ui.dialog.js
vendored
@ -330,7 +330,7 @@ $.widget("ui.dialog", {
|
|||||||
|
|
||||||
// prevent tabbing out of modal dialogs
|
// prevent tabbing out of modal dialogs
|
||||||
if ( options.modal ) {
|
if ( options.modal ) {
|
||||||
uiDialog.bind( "keyup.ui-dialog", function( event ) {
|
uiDialog.bind( "keydown.ui-dialog", function( event ) {
|
||||||
if ( event.keyCode !== $.ui.keyCode.TAB ) {
|
if ( event.keyCode !== $.ui.keyCode.TAB ) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user