Commit 16479e90 authored by Heinrich Fenkart's avatar Heinrich Fenkart

Merge pull request #15378 from twbs/fix-ie-modal-scrollbar-for-realz

Modal: Work around IE scrollbars not taking up page width
parents 68fef8c2 32f62bc5
......@@ -248,7 +248,12 @@
}
Modal.prototype.checkScrollbar = function () {
this.bodyIsOverflowing = document.body.scrollHeight > document.documentElement.clientHeight
var fullWindowWidth = window.innerWidth
if (!fullWindowWidth) { // workaround for missing window.innerWidth in IE8
var documentElementRect = document.documentElement.getBoundingClientRect()
fullWindowWidth = documentElementRect.right - Math.abs(documentElementRect.left)
}
this.bodyIsOverflowing = document.body.clientWidth < fullWindowWidth
this.scrollbarWidth = this.measureScrollbar()
}
......
Markdown is supported
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