Commit a69bc3bc authored by Tobias Lindig's avatar Tobias Lindig Committed by Chris Rebert

move call for removeBackdrop() to backdrop()

Closes #11958 by rebasing & merging it
parent 58ab1c64
......@@ -145,7 +145,6 @@
var that = this
this.$element.hide()
this.backdrop(function () {
that.removeBackdrop()
that.$element.trigger('hidden.bs.modal')
})
}
......@@ -156,6 +155,7 @@
}
Modal.prototype.backdrop = function (callback) {
var that = this
var animate = this.$element.hasClass('fade') ? 'fade' : ''
if (this.isShown && this.options.backdrop) {
......@@ -186,11 +186,15 @@
} else if (!this.isShown && this.$backdrop) {
this.$backdrop.removeClass('in')
var callbackRemove = function() {
that.removeBackdrop()
callback && callback()
}
$.support.transition && this.$element.hasClass('fade') ?
this.$backdrop
.one($.support.transition.end, callback)
.one($.support.transition.end, callbackRemove)
.emulateTransitionEnd(150) :
callback()
callbackRemove()
} else if (callback) {
callback()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment