mirror of
https://github.com/twbs/bootstrap.git
synced 2024-11-29 11:24:18 +01:00
possible fix for #14013
This commit is contained in:
parent
4715e05510
commit
1ce5e9f3ae
9
dist/js/bootstrap.js
vendored
9
dist/js/bootstrap.js
vendored
@ -1418,11 +1418,14 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re
|
|||||||
$element = $element || this.$element
|
$element = $element || this.$element
|
||||||
var el = $element[0]
|
var el = $element[0]
|
||||||
var isBody = el.tagName == 'BODY'
|
var isBody = el.tagName == 'BODY'
|
||||||
return $.extend({}, (typeof el.getBoundingClientRect == 'function') ? el.getBoundingClientRect() : null, {
|
var isSvg = window.SVGElement && el instanceof window.SVGElement
|
||||||
scroll: isBody ? document.documentElement.scrollTop || document.body.scrollTop : $element.scrollTop(),
|
var outerDims = isSvg ? {} : {
|
||||||
width: isBody ? $(window).width() : $element.outerWidth(),
|
width: isBody ? $(window).width() : $element.outerWidth(),
|
||||||
height: isBody ? $(window).height() : $element.outerHeight()
|
height: isBody ? $(window).height() : $element.outerHeight()
|
||||||
}, isBody ? { top: 0, left: 0 } : $element.offset())
|
}
|
||||||
|
return $.extend({}, (typeof el.getBoundingClientRect == 'function') ? el.getBoundingClientRect() : null, {
|
||||||
|
scroll: isBody ? document.documentElement.scrollTop || document.body.scrollTop : $element.scrollTop()
|
||||||
|
}, outerDims, isBody ? { top: 0, left: 0 } : $element.offset())
|
||||||
}
|
}
|
||||||
|
|
||||||
Tooltip.prototype.getCalculatedOffset = function (placement, pos, actualWidth, actualHeight) {
|
Tooltip.prototype.getCalculatedOffset = function (placement, pos, actualWidth, actualHeight) {
|
||||||
|
@ -318,11 +318,14 @@
|
|||||||
$element = $element || this.$element
|
$element = $element || this.$element
|
||||||
var el = $element[0]
|
var el = $element[0]
|
||||||
var isBody = el.tagName == 'BODY'
|
var isBody = el.tagName == 'BODY'
|
||||||
return $.extend({}, (typeof el.getBoundingClientRect == 'function') ? el.getBoundingClientRect() : null, {
|
var isSvg = window.SVGElement && el instanceof window.SVGElement
|
||||||
scroll: isBody ? document.documentElement.scrollTop || document.body.scrollTop : $element.scrollTop(),
|
var outerDims = isSvg ? {} : {
|
||||||
width: isBody ? $(window).width() : $element.outerWidth(),
|
width: isBody ? $(window).width() : $element.outerWidth(),
|
||||||
height: isBody ? $(window).height() : $element.outerHeight()
|
height: isBody ? $(window).height() : $element.outerHeight()
|
||||||
}, isBody ? { top: 0, left: 0 } : $element.offset())
|
}
|
||||||
|
return $.extend({}, (typeof el.getBoundingClientRect == 'function') ? el.getBoundingClientRect() : null, {
|
||||||
|
scroll: isBody ? document.documentElement.scrollTop || document.body.scrollTop : $element.scrollTop()
|
||||||
|
}, outerDims, isBody ? { top: 0, left: 0 } : $element.offset())
|
||||||
}
|
}
|
||||||
|
|
||||||
Tooltip.prototype.getCalculatedOffset = function (placement, pos, actualWidth, actualHeight) {
|
Tooltip.prototype.getCalculatedOffset = function (placement, pos, actualWidth, actualHeight) {
|
||||||
|
Loading…
Reference in New Issue
Block a user