diff options
author | Scott González <scott.gonzalez@gmail.com> | 2013-02-02 19:32:42 -0500 |
---|---|---|
committer | Scott González <scott.gonzalez@gmail.com> | 2013-02-02 19:32:42 -0500 |
commit | 8724092e5070125e2610e8b0e6ee9ada126cf504 (patch) | |
tree | 62eeb38c62b8c8d2b8a6affca77d786a5c3fbab4 /tests/unit/dialog | |
parent | 9c6b8f859ae3ad3f956c6f9264da13fb44b3484d (diff) | |
download | jquery-ui-8724092e5070125e2610e8b0e6ee9ada126cf504.tar.gz jquery-ui-8724092e5070125e2610e8b0e6ee9ada126cf504.zip |
Dialog: Don't use ._on() for modal event handlers. Fixes #9048 - Dialog: broken focusin event handler when beforeclose event of a modal opens another modal.
Diffstat (limited to 'tests/unit/dialog')
-rw-r--r-- | tests/unit/dialog/dialog_core.js | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/unit/dialog/dialog_core.js b/tests/unit/dialog/dialog_core.js index 9292eca9f..e85759dc9 100644 --- a/tests/unit/dialog/dialog_core.js +++ b/tests/unit/dialog/dialog_core.js @@ -147,4 +147,17 @@ asyncTest( "Prevent tabbing out of dialogs", function() { }); }); +asyncTest( "#9048: multiple modal dialogs opened and closed in different order", function() { + expect( 1 ); + $( "#dialog1, #dialog2" ).dialog({ autoOpen: false, modal:true }); + $( "#dialog1" ).dialog( "open" ); + $( "#dialog2" ).dialog( "open" ); + $( "#dialog1" ).dialog( "close" ); + setTimeout(function() { + $( "#dialog2" ).dialog( "close" ); + $( "#favorite-animal" ).focus(); + ok( true, "event handlers cleaned up (no errors thrown)" ); + start(); + }); +}); })(jQuery); |