aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorQuentin Spencer-Harper <[email protected]>2015-01-13 14:59:47 +0000
committerHeinrich Fenkart <[email protected]>2015-02-26 06:53:58 +0100
commitacc5f6575698b8cbaf18892842301c10303c4502 (patch)
treeabf61aaa642f5f463a0fc9e7e7ce6cec1f8de567
parentf43c67b0c5e98208bb85228d6d98752488d4e31c (diff)
downloadbootstrap-acc5f6575698b8cbaf18892842301c10303c4502.tar.xz
bootstrap-acc5f6575698b8cbaf18892842301c10303c4502.zip
Tooltip: Avoid creating an unnecessary tooltip when `Tooltip#hide` is called
Fixed performance bug where a tooltip element is created and then immediately destroyed when tooltip.hide() is called and there is no existing tooltip element Resolves #15557 by merging it.
-rw-r--r--js/tooltip.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/js/tooltip.js b/js/tooltip.js
index 0467c71d1..7f89a37ac 100644
--- a/js/tooltip.js
+++ b/js/tooltip.js
@@ -292,7 +292,7 @@
Tooltip.prototype.hide = function (callback) {
var that = this
- var $tip = this.tip()
+ var $tip = $(this.$tip)
var e = $.Event('hide.bs.' + this.type)
function complete() {
@@ -309,7 +309,7 @@
$tip.removeClass('in')
- $.support.transition && this.$tip.hasClass('fade') ?
+ $.support.transition && $tip.hasClass('fade') ?
$tip
.one('bsTransitionEnd', complete)
.emulateTransitionEnd(Tooltip.TRANSITION_DURATION) :