mirror of
https://github.com/Hopiu/bootstrap.git
synced 2026-03-22 15:30:23 +00:00
shiiiit
This commit is contained in:
parent
0992a85932
commit
839b0c893f
5 changed files with 21 additions and 4 deletions
2
docs/assets/js/bootstrap-modal.js
vendored
2
docs/assets/js/bootstrap-modal.js
vendored
|
|
@ -148,7 +148,7 @@
|
|||
}
|
||||
|
||||
, removeBackdrop: function () {
|
||||
this.$backdrop.remove()
|
||||
this.$backdrop && this.$backdrop.remove()
|
||||
this.$backdrop = null
|
||||
}
|
||||
|
||||
|
|
|
|||
2
docs/assets/js/bootstrap.js
vendored
2
docs/assets/js/bootstrap.js
vendored
|
|
@ -946,7 +946,7 @@
|
|||
}
|
||||
|
||||
, removeBackdrop: function () {
|
||||
this.$backdrop.remove()
|
||||
this.$backdrop && this.$backdrop.remove()
|
||||
this.$backdrop = null
|
||||
}
|
||||
|
||||
|
|
|
|||
2
docs/assets/js/bootstrap.min.js
vendored
2
docs/assets/js/bootstrap.min.js
vendored
File diff suppressed because one or more lines are too long
2
js/bootstrap-modal.js
vendored
2
js/bootstrap-modal.js
vendored
|
|
@ -148,7 +148,7 @@
|
|||
}
|
||||
|
||||
, removeBackdrop: function () {
|
||||
this.$backdrop.remove()
|
||||
this.$backdrop && this.$backdrop.remove()
|
||||
this.$backdrop = null
|
||||
}
|
||||
|
||||
|
|
|
|||
17
js/tests/unit/bootstrap-modal.js
vendored
17
js/tests/unit/bootstrap-modal.js
vendored
|
|
@ -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")
|
||||
})
|
||||
})
|
||||
Loading…
Reference in a new issue