diff options
| author | Heinrich Fenkart <[email protected]> | 2014-11-05 00:36:52 +0100 |
|---|---|---|
| committer | Heinrich Fenkart <[email protected]> | 2014-11-05 00:36:52 +0100 |
| commit | 6020bb06f242450b34a55e6098e9549f33fcc226 (patch) | |
| tree | fd9792c8311555ea833edbabb6fb5361053f7565 /docs/dist/js/bootstrap.js | |
| parent | 0018723ccee06d704e31b83df6a0a3fd1f02d309 (diff) | |
| download | bootstrap-6020bb06f242450b34a55e6098e9549f33fcc226.tar.xz bootstrap-6020bb06f242450b34a55e6098e9549f33fcc226.zip | |
grunt
Diffstat (limited to 'docs/dist/js/bootstrap.js')
| -rw-r--r-- | docs/dist/js/bootstrap.js | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/docs/dist/js/bootstrap.js b/docs/dist/js/bootstrap.js index 8f24ca05e..b66a59f99 100644 --- a/docs/dist/js/bootstrap.js +++ b/docs/dist/js/bootstrap.js @@ -963,6 +963,7 @@ if (typeof jQuery === 'undefined') { this.setScrollbar() this.escape() + if (this.options.backdrop) this.resize() this.$element.on('click.dismiss.bs.modal', '[data-dismiss="modal"]', $.proxy(this.hide, this)) @@ -977,6 +978,8 @@ if (typeof jQuery === 'undefined') { .show() .scrollTop(0) + if (that.options.backdrop) that.setBackdropHeight() + if (transition) { that.$element[0].offsetWidth // force reflow } @@ -1011,6 +1014,7 @@ if (typeof jQuery === 'undefined') { this.isShown = false this.escape() + if (this.options.backdrop) this.resize() $(document).off('focusin.bs.modal') @@ -1046,6 +1050,14 @@ if (typeof jQuery === 'undefined') { } } + 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() @@ -1107,6 +1119,12 @@ if (typeof jQuery === 'undefined') { } } + Modal.prototype.setBackdropHeight = function () { + this.$backdrop + .css('height', 0) + .css('height', this.$element[0].scrollHeight) + } + Modal.prototype.checkScrollbar = function () { this.scrollbarWidth = this.measureScrollbar() } |
