diff options
author | Thomas Park <thomas@thomaspark.co> | 2016-07-30 17:56:26 -0400 |
---|---|---|
committer | Thomas Park <thomas@thomaspark.co> | 2016-07-30 17:56:26 -0400 |
commit | 4b0d3762f309326a6d66fa4ea18945a7fc11f8ef (patch) | |
tree | 200dec9f06653572a265432575829df3c0003ca3 /bower_components/bootstrap-sass-official/assets/javascripts/bootstrap/tooltip.js | |
parent | 316f055624e046b4a23dc9a35629b87b1be8f58e (diff) |
update to v3.3.7
Diffstat (limited to 'bower_components/bootstrap-sass-official/assets/javascripts/bootstrap/tooltip.js')
-rw-r--r-- | bower_components/bootstrap-sass-official/assets/javascripts/bootstrap/tooltip.js | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/bower_components/bootstrap-sass-official/assets/javascripts/bootstrap/tooltip.js b/bower_components/bootstrap-sass-official/assets/javascripts/bootstrap/tooltip.js index 7094b34d..e35d9c7c 100644 --- a/bower_components/bootstrap-sass-official/assets/javascripts/bootstrap/tooltip.js +++ b/bower_components/bootstrap-sass-official/assets/javascripts/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 }) } |