Commit 4cb39987 authored by Bootstrap's Grunt bot's avatar Bootstrap's Grunt bot
Browse files

automatic grunt dist

parent 442d2dd4
Showing with 11 additions and 9 deletions
+11 -9
...@@ -916,12 +916,13 @@ if (typeof jQuery === 'undefined') { ...@@ -916,12 +916,13 @@ if (typeof jQuery === 'undefined') {
// ====================== // ======================
var Modal = function (element, options) { var Modal = function (element, options) {
this.options = options this.options = options
this.$body = $(document.body) this.$body = $(document.body)
this.$element = $(element) this.$element = $(element)
this.$backdrop = null this.$backdrop = null
this.isShown = null this.isShown = null
this.scrollbarWidth = 0 this.originalBodyPad = null
this.scrollbarWidth = 0
if (this.options.remote) { if (this.options.remote) {
this.$element this.$element
...@@ -1161,11 +1162,12 @@ if (typeof jQuery === 'undefined') { ...@@ -1161,11 +1162,12 @@ if (typeof jQuery === 'undefined') {
Modal.prototype.setScrollbar = function () { Modal.prototype.setScrollbar = function () {
var bodyPad = parseInt((this.$body.css('padding-right') || 0), 10) 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) if (this.bodyIsOverflowing) this.$body.css('padding-right', bodyPad + this.scrollbarWidth)
} }
Modal.prototype.resetScrollbar = function () { Modal.prototype.resetScrollbar = function () {
this.$body.css('padding-right', '') this.$body.css('padding-right', this.originalBodyPad)
} }
Modal.prototype.measureScrollbar = function () { // thx walsh Modal.prototype.measureScrollbar = function () { // thx walsh
......
This diff is collapsed.
Supports Markdown
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