mirror of
https://github.com/twbs/bootstrap.git
synced 2022-11-09 12:25:43 -05:00
Cancel running timer for tooltips with delayed show, but instant hide. This prevents delayed tooltips from appearing if the mouse leaves the elements before tooltip is showed and the hiding delay is 0.
This commit is contained in:
parent
b261f9781b
commit
e9a7d26d06
1 changed files with 2 additions and 1 deletions
3
js/bootstrap-tooltip.js
vendored
3
js/bootstrap-tooltip.js
vendored
|
@ -84,6 +84,7 @@
|
|||
, leave: function (e) {
|
||||
var self = $(e.currentTarget)[this.type](this._options).data(this.type)
|
||||
|
||||
if (this.timeout) clearTimeout(this.timeout)
|
||||
if (!self.options.delay || !self.options.delay.hide) return self.hide()
|
||||
|
||||
clearTimeout(this.timeout)
|
||||
|
@ -272,4 +273,4 @@
|
|||
, delay: 0
|
||||
}
|
||||
|
||||
}(window.jQuery);
|
||||
}(window.jQuery);
|
||||
|
|
Loading…
Reference in a new issue