diff options
author | Gleb Mazovetskiy <glex.spb@gmail.com> | 2014-09-13 06:20:45 +0400 |
---|---|---|
committer | Gleb Mazovetskiy <glex.spb@gmail.com> | 2014-09-13 06:20:45 +0400 |
commit | d527f208576e5f513eaac86d78a65fa890974572 (patch) | |
tree | 38ec5a369e949bf3978fcec5d9716585504a6f3e /assets/javascripts/bootstrap.js | |
parent | 6e7f0f943bed639bc315ba26bc277a6af187fe1a (diff) |
rake convert
Diffstat (limited to 'assets/javascripts/bootstrap.js')
-rw-r--r-- | assets/javascripts/bootstrap.js | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/assets/javascripts/bootstrap.js b/assets/javascripts/bootstrap.js index 07c8c193..00be9ffb 100644 --- a/assets/javascripts/bootstrap.js +++ b/assets/javascripts/bootstrap.js @@ -648,7 +648,7 @@ this.$element.trigger(startEvent) if (startEvent.isDefaultPrevented()) return - var actives = this.$parent && this.$parent.find('> .panel > .in') + var actives = this.$parent && this.$parent.find('> .panel').children('.in, .collapsing') if (actives && actives.length) { var hasData = actives.data('bs.collapse') @@ -1197,6 +1197,7 @@ return ($href && $href.length && $href.is(':visible') + && $el.is(':visible') && [[$href[offsetMethod]().top + offsetBase, href]]) || null }) .sort(function (a, b) { return a[0] - b[0] }) @@ -1868,7 +1869,7 @@ $tip.removeClass('fade in top bottom left right') } - Tooltip.prototype.hide = function () { + Tooltip.prototype.hide = function (callback) { var that = this var $tip = this.tip() var e = $.Event('hide.bs.' + this.type) @@ -1878,6 +1879,7 @@ that.$element .removeAttr('aria-describedby') .trigger('hidden.bs.' + that.type) + callback && callback() } this.$element.trigger(e) @@ -1916,6 +1918,10 @@ var isSvg = window.SVGElement && el instanceof window.SVGElement var elRect = el.getBoundingClientRect() + if (elRect.width == null) { + // 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 scroll = { scroll: isBody ? document.documentElement.scrollTop || document.body.scrollTop : $element.scrollTop() } var outerDims = isSvg ? {} : { @@ -2021,8 +2027,11 @@ } Tooltip.prototype.destroy = function () { + var that = this clearTimeout(this.timeout) - this.hide().$element.off('.' + this.type).removeData('bs.' + this.type) + this.hide(function () { + that.$element.off('.' + that.type).removeData('bs.' + that.type) + }) } |