summaryrefslogtreecommitdiff
path: root/xstatic/pkg/bootstrap_scss/data/js/bootstrap/tooltip.js
diff options
context:
space:
mode:
Diffstat (limited to 'xstatic/pkg/bootstrap_scss/data/js/bootstrap/tooltip.js')
-rw-r--r--xstatic/pkg/bootstrap_scss/data/js/bootstrap/tooltip.js20
1 files changed, 13 insertions, 7 deletions
diff --git a/xstatic/pkg/bootstrap_scss/data/js/bootstrap/tooltip.js b/xstatic/pkg/bootstrap_scss/data/js/bootstrap/tooltip.js
index 7094b34..e35d9c7 100644
--- a/xstatic/pkg/bootstrap_scss/data/js/bootstrap/tooltip.js
+++ b/xstatic/pkg/bootstrap_scss/data/js/bootstrap/tooltip.js
@@ -1,9 +1,9 @@
/* ========================================================================
- * Bootstrap: tooltip.js v3.3.6
+ * Bootstrap: tooltip.js v3.3.7
* http://getbootstrap.com/javascript/#tooltip
* Inspired by the original jQuery.tipsy by Jason Frame
* ========================================================================
- * Copyright 2011-2015 Twitter, Inc.
+ * Copyright 2011-2016 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* ======================================================================== */
@@ -26,7 +26,7 @@
this.init('tooltip', element, options)
}
- Tooltip.VERSION = '3.3.6'
+ Tooltip.VERSION = '3.3.7'
Tooltip.TRANSITION_DURATION = 150
@@ -317,9 +317,11 @@
function complete() {
if (that.hoverState != 'in') $tip.detach()
- that.$element
- .removeAttr('aria-describedby')
- .trigger('hidden.bs.' + that.type)
+ if (that.$element) { // TODO: Check whether guarding this code with this `if` is really necessary.
+ that.$element
+ .removeAttr('aria-describedby')
+ .trigger('hidden.bs.' + that.type)
+ }
callback && callback()
}
@@ -362,7 +364,10 @@
// width and height are missing in IE8, so compute them manually; see https://github.com/twbs/bootstrap/issues/14093
elRect = $.extend({}, elRect, { width: elRect.right - elRect.left, height: elRect.bottom - elRect.top })
}
- var elOffset = isBody ? { top: 0, left: 0 } : $element.offset()
+ var isSvg = window.SVGElement && el instanceof window.SVGElement
+ // Avoid using $.offset() on SVGs since it gives incorrect results in jQuery 3.
+ // See https://github.com/twbs/bootstrap/issues/20280
+ var elOffset = isBody ? { top: 0, left: 0 } : (isSvg ? null : $element.offset())
var scroll = { scroll: isBody ? document.documentElement.scrollTop || document.body.scrollTop : $element.scrollTop() }
var outerDims = isBody ? { width: $(window).width(), height: $(window).height() } : null
@@ -478,6 +483,7 @@
that.$tip = null
that.$arrow = null
that.$viewport = null
+ that.$element = null
})
}