0
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-02-19 16:54:24 +01:00
This commit is contained in:
fat 2013-02-28 21:15:33 -08:00
parent 0992a85932
commit 839b0c893f
5 changed files with 21 additions and 4 deletions

View File

@ -148,7 +148,7 @@
}
, removeBackdrop: function () {
this.$backdrop.remove()
this.$backdrop && this.$backdrop.remove()
this.$backdrop = null
}

View File

@ -946,7 +946,7 @@
}
, removeBackdrop: function () {
this.$backdrop.remove()
this.$backdrop && this.$backdrop.remove()
this.$backdrop = null
}

File diff suppressed because one or more lines are too long

View File

@ -148,7 +148,7 @@
}
, removeBackdrop: function () {
this.$backdrop.remove()
this.$backdrop && this.$backdrop.remove()
this.$backdrop = null
}

View File

@ -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")
})
})