Skip to content

Commit 5d4d40f

Browse files
committed
Dialog: Update to 96e5c24 - keyup apparently doesn't work like I thought it would everywhere, switching back to keydown.
(cherry picked from commit dfe75e1)
1 parent 8f16cc3 commit 5d4d40f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

tests/unit/dialog/dialog_tickets.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ asyncTest( "#3123: Prevent tabbing out of modal dialogs", function() {
1414

1515
inputs.eq( 1 ).focus();
1616
equal( document.activeElement, inputs[1], "Focus set on second input" );
17-
inputs.eq( 1 ).simulate( "keyup", { keyCode: $.ui.keyCode.TAB });
17+
inputs.eq( 1 ).simulate( "keydown", { keyCode: $.ui.keyCode.TAB });
1818

1919
setTimeout( checkTab, 2 );
2020

ui/jquery.ui.dialog.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,7 @@ $.widget("ui.dialog", {
330330

331331
// prevent tabbing out of modal dialogs
332332
if ( options.modal ) {
333-
uiDialog.bind( "keyup.ui-dialog", function( event ) {
333+
uiDialog.bind( "keydown.ui-dialog", function( event ) {
334334
if ( event.keyCode !== $.ui.keyCode.TAB ) {
335335
return;
336336
}

0 commit comments

Comments
 (0)