diff options
author | Scott González <scott.gonzalez@gmail.com> | 2010-02-16 02:13:38 +0000 |
---|---|---|
committer | Scott González <scott.gonzalez@gmail.com> | 2010-02-16 02:13:38 +0000 |
commit | c9f30818afb8c4cd514fcebc8ee05a409e78e065 (patch) | |
tree | 31ec090332f276b1332871de1eb84a3231826e8e /tests | |
parent | 828bcdd2f0befbf450dcd1d7c387388acd7a191b (diff) | |
download | jquery-ui-c9f30818afb8c4cd514fcebc8ee05a409e78e065.tar.gz jquery-ui-c9f30818afb8c4cd514fcebc8ee05a409e78e065.zip |
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.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/unit/dialog/dialog_tickets.js | 14 |
1 files changed, 14 insertions, 0 deletions
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 = $( "<div></div>" ).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); |