aboutsummaryrefslogtreecommitdiffstats
path: root/tests/unit/dialog/dialog_options.js
diff options
context:
space:
mode:
authorKris Borchers <kris.borchers@gmail.com>2013-01-30 12:30:37 -0600
committerKris Borchers <kris.borchers@gmail.com>2013-01-30 12:30:37 -0600
commitd1505e3434ef99e0068347a5e8179a0ffd737676 (patch)
tree4ed70ffa8a563fd06cfa6168045a7f6c74616851 /tests/unit/dialog/dialog_options.js
parentceebe07e2c99190030c16b031813ae660d9283d1 (diff)
downloadjquery-ui-d1505e3434ef99e0068347a5e8179a0ffd737676.tar.gz
jquery-ui-d1505e3434ef99e0068347a5e8179a0ffd737676.zip
Dialog: Move call to _focusTabbable and triggering of open and focus events into the _show callback. Fixes #6756 - Dialog: show: "blind" with link in content doesn't animate properly. Fixes #8051 - Dialog: 'Explode' dialog animation causes crash in IE 6, 7 and 8. Fixes #4421 - Dialog: Focus lost from dialog which uses show-effect
Diffstat (limited to 'tests/unit/dialog/dialog_options.js')
-rw-r--r--tests/unit/dialog/dialog_options.js40
1 files changed, 40 insertions, 0 deletions
diff --git a/tests/unit/dialog/dialog_options.js b/tests/unit/dialog/dialog_options.js
index 5f0434308..ecb7e5dd2 100644
--- a/tests/unit/dialog/dialog_options.js
+++ b/tests/unit/dialog/dialog_options.js
@@ -531,4 +531,44 @@ test("#4826: setting resizable false toggles resizable on dialog", function() {
});
+asyncTest( "#8051 - 'Explode' dialog animation causes crash in IE 6, 7 and 8", function() {
+ expect( 1 );
+ var el = $( "<div></div>" ).dialog({
+ show: "explode",
+ focus: function() {
+ ok( true, "dialog opened with animation" );
+ el.remove();
+ start();
+ }
+ });
+});
+
+asyncTest( "#4421 - Focus lost from dialog which uses show-effect", function() {
+ expect( 1 );
+ var el = $( "<div></div>" ).dialog({
+ show: "blind",
+ focus: function() {
+ equal( el.dialog( "widget" ).find( ":focus" ).length, 1, "dialog maintains focus" );
+ el.remove();
+ start();
+ }
+ });
+});
+
+asyncTest( "Open followed by close during show effect", function() {
+ expect( 1 );
+ var el = $( "<div></div>" ).dialog({
+ show: "blind",
+ close: function() {
+ ok( true, "dialog closed properly during animation" );
+ el.remove();
+ start();
+ }
+ });
+
+ setTimeout( function() {
+ el.dialog("close");
+ }, 100 );
+});
+
})(jQuery);