diff options
author | Scott González <scott.gonzalez@gmail.com> | 2013-08-06 15:06:08 -0400 |
---|---|---|
committer | Scott González <scott.gonzalez@gmail.com> | 2013-08-07 08:57:36 -0400 |
commit | c9815f13b487d027ef9b6095588dbb73141c9a09 (patch) | |
tree | e71e3d512cce33d39c6c868743135ddc81c60533 /tests/unit/dialog | |
parent | 92d54213958561ea1cfcdbaaaa53bbb6037a1e86 (diff) | |
download | jquery-ui-c9815f13b487d027ef9b6095588dbb73141c9a09.tar.gz jquery-ui-c9815f13b487d027ef9b6095588dbb73141c9a09.zip |
Dialog: Search the correct document for focus trapping. Fixes #9439 - Dialog: Context is not respected for modals.
Diffstat (limited to 'tests/unit/dialog')
-rw-r--r-- | tests/unit/dialog/dialog_methods.js | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/unit/dialog/dialog_methods.js b/tests/unit/dialog/dialog_methods.js index 2bb06ab46..60a7aa4d8 100644 --- a/tests/unit/dialog/dialog_methods.js +++ b/tests/unit/dialog/dialog_methods.js @@ -63,21 +63,21 @@ test("destroy", function() { // Don't throw errors when destroying a never opened modal dialog (#9004) $( "#dialog1" ).dialog({ autoOpen: false, modal: true }).dialog( "destroy" ); equal( $( ".ui-widget-overlay" ).length, 0, "overlay does not exist" ); - equal( $.ui.dialog.overlayInstances, 0, "overlayInstances equals the number of open overlays"); + equal( $( document ).data( "ui-dialog-overlays" ), undefined, "ui-dialog-overlays equals the number of open overlays"); element = $( "#dialog1" ).dialog({ modal: true }), element2 = $( "#dialog2" ).dialog({ modal: true }); equal( $( ".ui-widget-overlay" ).length, 2, "overlays created when dialogs are open" ); - equal( $.ui.dialog.overlayInstances, 2, "overlayInstances equals the number of open overlays" ); + equal( $( document ).data( "ui-dialog-overlays" ), 2, "ui-dialog-overlays equals the number of open overlays" ); element.dialog( "close" ); equal( $( ".ui-widget-overlay" ).length, 1, "overlay remains after closing one dialog" ); - equal( $.ui.dialog.overlayInstances, 1, "overlayInstances equals the number of open overlays" ); + equal( $( document ).data( "ui-dialog-overlays" ), 1, "ui-dialog-overlays equals the number of open overlays" ); element.dialog( "destroy" ); equal( $( ".ui-widget-overlay" ).length, 1, "overlay remains after destroying one dialog" ); - equal( $.ui.dialog.overlayInstances, 1, "overlayInstances equals the number of open overlays" ); + equal( $( document ).data( "ui-dialog-overlays" ), 1, "ui-dialog-overlays equals the number of open overlays" ); element2.dialog( "destroy" ); equal( $( ".ui-widget-overlay" ).length, 0, "overlays removed when all dialogs are destoryed" ); - equal( $.ui.dialog.overlayInstances, 0, "overlayInstances equals the number of open overlays" ); + equal( $( document ).data( "ui-dialog-overlays" ), undefined, "ui-dialog-overlays equals the number of open overlays" ); }); asyncTest("#9000: Dialog leaves broken event handler after close/destroy in certain cases", function() { |