mirror of
https://github.com/twbs/bootstrap.git
synced 2025-02-20 17:54:23 +01:00
Merge branch 'stefansundin/master'
This commit is contained in:
commit
7f56233862
@ -207,8 +207,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
Modal.prototype.checkScrollbar = function () {
|
Modal.prototype.checkScrollbar = function () {
|
||||||
if (document.body.clientWidth >= window.innerWidth) return
|
this.scrollbarWidth = this.measureScrollbar()
|
||||||
this.scrollbarWidth = this.scrollbarWidth || this.measureScrollbar()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Modal.prototype.setScrollbar = function () {
|
Modal.prototype.setScrollbar = function () {
|
||||||
@ -221,6 +220,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
Modal.prototype.measureScrollbar = function () { // thx walsh
|
Modal.prototype.measureScrollbar = function () { // thx walsh
|
||||||
|
if (document.body.clientWidth >= window.innerWidth) return 0
|
||||||
var scrollDiv = document.createElement('div')
|
var scrollDiv = document.createElement('div')
|
||||||
scrollDiv.className = 'modal-scrollbar-measure'
|
scrollDiv.className = 'modal-scrollbar-measure'
|
||||||
this.$body.append(scrollDiv)
|
this.$body.append(scrollDiv)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user