this.setScrollbar()
this.escape()
+ if (this.options.backdrop) this.resize()
this.$element.on('click.dismiss.bs.modal', '[data-dismiss="modal"]', $.proxy(this.hide, this))
.show()
.scrollTop(0)
+ if (that.options.backdrop) that.setBackdropHeight()
+
if (transition) {
that.$element[0].offsetWidth // force reflow
}
this.isShown = false
this.escape()
+ if (this.options.backdrop) this.resize()
$(document).off('focusin.bs.modal')
}
}
+ Modal.prototype.resize = function () {
+ if (this.isShown) {
+ $(window).on('resize.bs.modal', $.proxy(this.setBackdropHeight, this))
+ } else {
+ $(window).off('resize.bs.modal')
+ }
+ }
+
Modal.prototype.hideModal = function () {
var that = this
this.$element.hide()
}
}
+ Modal.prototype.setBackdropHeight = function () {
+ this.$backdrop
+ .css('height', 0)
+ .css('height', this.$element[0].scrollHeight)
+ }
+
Modal.prototype.checkScrollbar = function () {
this.scrollbarWidth = this.measureScrollbar()
}