Commit acc5f657 authored by Quentin Spencer-Harper's avatar Quentin Spencer-Harper Committed by Heinrich Fenkart

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.
parent f43c67b0
......@@ -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) :
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment