From: Jørgen Borgesen Date: Mon, 14 May 2012 12:03:36 +0000 (+0200) Subject: Cancel running timer for tooltips with delayed show, but instant hide. This prevents... X-Git-Tag: v2.0.4~1^2~1^2~2 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F3478%2Fhead;p=thirdparty%2Fbootstrap.git 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. --- diff --git a/js/bootstrap-tooltip.js b/js/bootstrap-tooltip.js index 577ead48b5..4c2a2a328d 100644 --- a/js/bootstrap-tooltip.js +++ b/js/bootstrap-tooltip.js @@ -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); \ No newline at end of file +}(window.jQuery);