Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/twbs/bootstrap.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'js/tests/unit/bootstrap-modal.js')
-rw-r--r--js/tests/unit/bootstrap-modal.js17
1 files changed, 17 insertions, 0 deletions
diff --git a/js/tests/unit/bootstrap-modal.js b/js/tests/unit/bootstrap-modal.js
index 98aa990a67..b0096f8ed3 100644
--- a/js/tests/unit/bootstrap-modal.js
+++ b/js/tests/unit/bootstrap-modal.js
@@ -117,4 +117,21 @@ $(function () {
})
.modal("toggle")
})
+
+ test("should allow modal close with 'backdrop:false'", function () {
+ stop()
+ $.support.transition = false
+ var div = $("<div>", { id: 'modal-test', "data-backdrop": false })
+ div
+ .bind("shown", function () {
+ ok($('#modal-test').is(":visible"), 'modal visible')
+ div.modal("hide")
+ })
+ .bind("hidden", function() {
+ ok(!$('#modal-test').is(":visible"), 'modal hidden')
+ div.remove()
+ start()
+ })
+ .modal("show")
+ })
}) \ No newline at end of file