diff options
| author | Heinrich Fenkart <[email protected]> | 2014-09-25 02:08:30 +0200 |
|---|---|---|
| committer | Heinrich Fenkart <[email protected]> | 2014-09-25 02:08:30 +0200 |
| commit | 61a4fee626f5c10eb56149d0d8abb093c9fbbf98 (patch) | |
| tree | 4b848f10c148140ef46908d23564a25c4d2ece9f /js/tooltip.js | |
| parent | e70fc61eff8f4e08ccf1728ecbce7e32465cdd25 (diff) | |
| parent | 24ae068f21bd619235dfed5b9218b5b83b815160 (diff) | |
| download | bootstrap-61a4fee626f5c10eb56149d0d8abb093c9fbbf98.tar.xz bootstrap-61a4fee626f5c10eb56149d0d8abb093c9fbbf98.zip | |
Merge pull request #14599 from twbs/tooltip-outerDims-only-when-body
Tooltip: Rely on `getBoundingClientRect` for `width` and `height`
Diffstat (limited to 'js/tooltip.js')
| -rw-r--r-- | js/tooltip.js | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/js/tooltip.js b/js/tooltip.js index 9932c0b18..d0da83a5a 100644 --- a/js/tooltip.js +++ b/js/tooltip.js @@ -329,7 +329,6 @@ var el = $element[0] var isBody = el.tagName == 'BODY' - var isSvg = window.SVGElement && el instanceof window.SVGElement var elRect = el.getBoundingClientRect() if (elRect.width == null) { @@ -338,10 +337,7 @@ } var elOffset = isBody ? { top: 0, left: 0 } : $element.offset() var scroll = { scroll: isBody ? document.documentElement.scrollTop || document.body.scrollTop : $element.scrollTop() } - var outerDims = isSvg ? {} : { - width: isBody ? $(window).width() : $element.outerWidth(), - height: isBody ? $(window).height() : $element.outerHeight() - } + var outerDims = isBody ? { width: $(window).width(), height: $(window).height() } : null return $.extend({}, elRect, scroll, outerDims, elOffset) } |
