mirror of
https://github.com/twbs/bootstrap.git
synced 2025-02-19 16:54:24 +01:00
shiiiit
This commit is contained in:
parent
0992a85932
commit
839b0c893f
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…
x
Reference in New Issue
Block a user