mirror of
https://github.com/twbs/bootstrap.git
synced 2025-08-08 22:56:46 +02: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:
@@ -128,6 +128,7 @@
|
|||||||
this.$element.trigger(e)
|
this.$element.trigger(e)
|
||||||
|
|
||||||
if (e.isDefaultPrevented()) return
|
if (e.isDefaultPrevented()) return
|
||||||
|
var that = this;
|
||||||
|
|
||||||
var $tip = this.tip()
|
var $tip = this.tip()
|
||||||
|
|
||||||
@@ -178,7 +179,16 @@
|
|||||||
|
|
||||||
this.applyPlacement(calculatedOffset, placement)
|
this.applyPlacement(calculatedOffset, placement)
|
||||||
this.hoverState = null
|
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() {
|
function complete() {
|
||||||
if (that.hoverState != 'in') $tip.detach()
|
if (that.hoverState != 'in') $tip.detach()
|
||||||
|
that.$element.trigger('hidden.bs.' + that.type)
|
||||||
}
|
}
|
||||||
|
|
||||||
this.$element.trigger(e)
|
this.$element.trigger(e)
|
||||||
@@ -276,7 +287,6 @@
|
|||||||
complete()
|
complete()
|
||||||
|
|
||||||
this.hoverState = null
|
this.hoverState = null
|
||||||
this.$element.trigger('hidden.bs.' + this.type)
|
|
||||||
|
|
||||||
return this
|
return this
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user