Commit 6e206f5e authored by Heinrich Fenkart's avatar Heinrich Fenkart
Browse files

Merge pull request #14492 from twbs/ie8-getBoundingClientRect

Handle lack of .width and .height from getBoundingClientRect() in IE8
parents 97027a2f 989dafb1
4 merge requests!28721Hot test,!16605Test pull please ignore,!22103test,!25326Adjust examples
Showing with 4 additions and 0 deletions
+4 -0
......@@ -329,6 +329,10 @@
var isSvg = window.SVGElement && el instanceof window.SVGElement
var elRect = el.getBoundingClientRect()
if (elRect.width == null) {
// width and height are missing in IE8, so compute them manually; see https://github.com/twbs/bootstrap/issues/14093
elRect = $.extend({}, elRect, { width: elRect.right - elRect.left, height: elRect.bottom - elRect.top })
}
var elOffset = isBody ? { top: 0, left: 0 } : $element.offset()
var scroll = { scroll: isBody ? document.documentElement.scrollTop || document.body.scrollTop : $element.scrollTop() }
var outerDims = isSvg ? {} : {
......
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