mirror of
https://github.com/twbs/bootstrap.git
synced 2022-11-09 12:25:43 -05:00
Merge branch 'tooltip-events-fix' of git://github.com/lukaszfiszer/bootstrap into lukaszfiszer-tooltip-events-fix
Conflicts: js/tooltip.js
This commit is contained in:
commit
c25fa0661a
1 changed files with 12 additions and 2 deletions
|
@ -128,6 +128,7 @@
|
|||
this.$element.trigger(e)
|
||||
|
||||
if (e.isDefaultPrevented()) return
|
||||
var that = this;
|
||||
|
||||
var $tip = this.tip()
|
||||
|
||||
|
@ -178,7 +179,16 @@
|
|||
|
||||
this.applyPlacement(calculatedOffset, placement)
|
||||
this.hoverState = null
|
||||
this.$element.trigger('shown.bs.' + this.type)
|
||||
|
||||
var complete = function() {
|
||||
that.$element.trigger('shown.bs.' + that.type)
|
||||
}
|
||||
|
||||
$.support.transition && this.$tip.hasClass('fade') ?
|
||||
$tip
|
||||
.one($.support.transition.end, complete)
|
||||
.emulateTransitionEnd(150) :
|
||||
complete()
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -261,6 +271,7 @@
|
|||
|
||||
function complete() {
|
||||
if (that.hoverState != 'in') $tip.detach()
|
||||
that.$element.trigger('hidden.bs.' + that.type)
|
||||
}
|
||||
|
||||
this.$element.trigger(e)
|
||||
|
@ -276,7 +287,6 @@
|
|||
complete()
|
||||
|
||||
this.hoverState = null
|
||||
this.$element.trigger('hidden.bs.' + this.type)
|
||||
|
||||
return this
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue