From 712b89ed4ebe71e44f2a7081be7ba372d8ca3f42 Mon Sep 17 00:00:00 2001 From: fat Date: Sat, 17 Aug 2013 14:24:38 -0700 Subject: fixes #9362 --- js/tests/unit/modal.js | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'js/tests/unit') diff --git a/js/tests/unit/modal.js b/js/tests/unit/modal.js index 2c610d83d..5755d2751 100644 --- a/js/tests/unit/modal.js +++ b/js/tests/unit/modal.js @@ -174,4 +174,23 @@ $(function () { }) .modal("show") }) + + test("should close reopened modal with [data-dismiss=modal] click", function () { + stop() + $.support.transition = false + var div = $("") + div + .bind("shown.bs.modal", function () { + $('#close').click() + ok(!$('#modal-test').is(":visible"), 'modal hidden') + }) + .one("hidden.bs.modal", function() { + div.one('hidden.bs.modal', function () { + start() + }).modal("show") + }) + .modal("show") + + div.remove() + }) }) -- cgit v1.2.3