From c9f30818afb8c4cd514fcebc8ee05a409e78e065 Mon Sep 17 00:00:00 2001 From: Scott González Date: Tue, 16 Feb 2010 02:13:38 +0000 Subject: Dialog: Update the internal flag for whether or not the dialog is open before triggering the close event. Fixes #5184 - isOpen in dialogclose event is true. --- tests/unit/dialog/dialog_tickets.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'tests') diff --git a/tests/unit/dialog/dialog_tickets.js b/tests/unit/dialog/dialog_tickets.js index d2fe271e6..296102c9b 100644 --- a/tests/unit/dialog/dialog_tickets.js +++ b/tests/unit/dialog/dialog_tickets.js @@ -26,4 +26,18 @@ test("#4826: setting resizable false toggles resizable on dialog", function() { }); +test("#5184: isOpen in dialogclose event is true", function() { + expect( 3 ); + + el = $( "
" ).dialog({ + close: function() { + ok( !el.dialog("isOpen"), "dialog is not open during close" ); + } + }); + ok( el.dialog("isOpen"), "dialog is open after init" ); + el.dialog( "close" ); + ok( !el.dialog("isOpen"), "dialog is not open after close" ); + el.remove(); +}); + })(jQuery); -- cgit v1.2.3