mirror of
https://github.com/twbs/bootstrap.git
synced 2025-02-20 17:54:23 +01:00
Fix IE8 reporting type object for getBoundingClientRect
This commit is contained in:
parent
05ddea314c
commit
0268b41c4f
@ -321,7 +321,7 @@
|
|||||||
var isBody = el.tagName == 'BODY'
|
var isBody = el.tagName == 'BODY'
|
||||||
var isSvg = window.SVGElement && el instanceof window.SVGElement
|
var isSvg = window.SVGElement && el instanceof window.SVGElement
|
||||||
|
|
||||||
var elRect = typeof el.getBoundingClientRect == 'function' ? el.getBoundingClientRect() : null
|
var elRect = el.getBoundingClientRect ? el.getBoundingClientRect() : null
|
||||||
var elOffset = isBody ? { top: 0, left: 0 } : $element.offset()
|
var elOffset = isBody ? { top: 0, left: 0 } : $element.offset()
|
||||||
var scroll = { scroll: isBody ? document.documentElement.scrollTop || document.body.scrollTop : $element.scrollTop() }
|
var scroll = { scroll: isBody ? document.documentElement.scrollTop || document.body.scrollTop : $element.scrollTop() }
|
||||||
var outerDims = isSvg ? {} : {
|
var outerDims = isSvg ? {} : {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user