0
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-01-18 10:52:19 +01:00

Assume Element.getBoundingClientRect() exists; Fixes #14093

[skip validator]
This commit is contained in:
Chris Rebert 2014-08-04 10:04:00 -07:00
parent e7d5905f38
commit ea0e1606dc

View File

@ -323,7 +323,7 @@
var isBody = el.tagName == 'BODY'
var isSvg = window.SVGElement && el instanceof window.SVGElement
var elRect = el.getBoundingClientRect ? el.getBoundingClientRect() : null
var elRect = el.getBoundingClientRect()
var elOffset = isBody ? { top: 0, left: 0 } : $element.offset()
var scroll = { scroll: isBody ? document.documentElement.scrollTop || document.body.scrollTop : $element.scrollTop() }
var outerDims = isSvg ? {} : {