diff options
| author | Bootstrap's Grunt bot <[email protected]> | 2015-02-26 07:21:21 +0000 |
|---|---|---|
| committer | Bootstrap's Grunt bot <[email protected]> | 2015-02-26 07:21:21 +0000 |
| commit | 4cb39987f07ca50d9466fabdb0814ad7c6f71c05 (patch) | |
| tree | 4c9d3002c88efcbb5eb5c443b298895718e296a2 /dist/js/bootstrap.js | |
| parent | 442d2dd458c6283c7ecb75c6eb7cb4bcee916eab (diff) | |
| download | bootstrap-4cb39987f07ca50d9466fabdb0814ad7c6f71c05.tar.xz bootstrap-4cb39987f07ca50d9466fabdb0814ad7c6f71c05.zip | |
automatic grunt dist
Diffstat (limited to 'dist/js/bootstrap.js')
| -rw-r--r-- | dist/js/bootstrap.js | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/dist/js/bootstrap.js b/dist/js/bootstrap.js index c5c2ecce3..65833d5e5 100644 --- a/dist/js/bootstrap.js +++ b/dist/js/bootstrap.js @@ -916,12 +916,13 @@ if (typeof jQuery === 'undefined') { // ====================== var Modal = function (element, options) { - this.options = options - this.$body = $(document.body) - this.$element = $(element) - this.$backdrop = null - this.isShown = null - this.scrollbarWidth = 0 + this.options = options + this.$body = $(document.body) + this.$element = $(element) + this.$backdrop = null + this.isShown = null + this.originalBodyPad = null + this.scrollbarWidth = 0 if (this.options.remote) { this.$element @@ -1161,11 +1162,12 @@ if (typeof jQuery === 'undefined') { Modal.prototype.setScrollbar = function () { var bodyPad = parseInt((this.$body.css('padding-right') || 0), 10) + this.originalBodyPad = document.body.style.paddingRight || '' if (this.bodyIsOverflowing) this.$body.css('padding-right', bodyPad + this.scrollbarWidth) } Modal.prototype.resetScrollbar = function () { - this.$body.css('padding-right', '') + this.$body.css('padding-right', this.originalBodyPad) } Modal.prototype.measureScrollbar = function () { // thx walsh |
