1
0
Fork 0
mirror of https://github.com/twbs/bootstrap.git synced 2022-11-09 12:25:43 -05:00
This commit is contained in:
Mark Otto 2014-09-08 10:23:25 -07:00
parent 7f56233862
commit 48a1308e5d
5 changed files with 9 additions and 9 deletions

View file

@ -1050,8 +1050,7 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re
}
Modal.prototype.checkScrollbar = function () {
if (document.body.clientWidth >= window.innerWidth) return
this.scrollbarWidth = this.scrollbarWidth || this.measureScrollbar()
this.scrollbarWidth = this.measureScrollbar()
}
Modal.prototype.setScrollbar = function () {
@ -1064,6 +1063,7 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re
}
Modal.prototype.measureScrollbar = function () { // thx walsh
if (document.body.clientWidth >= window.innerWidth) return 0
var scrollDiv = document.createElement('div')
scrollDiv.className = 'modal-scrollbar-measure'
this.$body.append(scrollDiv)

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -1050,8 +1050,7 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re
}
Modal.prototype.checkScrollbar = function () {
if (document.body.clientWidth >= window.innerWidth) return
this.scrollbarWidth = this.scrollbarWidth || this.measureScrollbar()
this.scrollbarWidth = this.measureScrollbar()
}
Modal.prototype.setScrollbar = function () {
@ -1064,6 +1063,7 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re
}
Modal.prototype.measureScrollbar = function () { // thx walsh
if (document.body.clientWidth >= window.innerWidth) return 0
var scrollDiv = document.createElement('div')
scrollDiv.className = 'modal-scrollbar-measure'
this.$body.append(scrollDiv)

File diff suppressed because one or more lines are too long