mirror of
https://github.com/twbs/bootstrap.git
synced 2025-01-30 22:52:24 +01:00
Assume Element.getBoundingClientRect() exists; Fixes #14093
[skip validator]
This commit is contained in:
parent
e7d5905f38
commit
ea0e1606dc
@ -323,7 +323,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 = el.getBoundingClientRect ? el.getBoundingClientRect() : null
|
var elRect = el.getBoundingClientRect()
|
||||||
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