Commit e9a7d26d authored by Jørgen Borgesen's avatar Jørgen Borgesen
Browse files

Cancel running timer for tooltips with delayed show, but instant hide. This...

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.
parent b261f978
6 merge requests!3655Updated unit test for tooltips. Now using is() instead of hasClass(),!3654Added fix for bootstrap-tooltip with show-delay but now hide delay.,!3551Swapped out .hasClass() with .is() when checking for multiple classes,!3550Clear tooltips delayed show timer when leave event is triggered. ALSO when hide delay is 0.,!3549Clear tooltips delayed show timer when leave event is triggered. ALSO when hide delay is 0.,!3478Cancel delayed (show) timer when mouse leaves element for tooltips with hiding delay of 0 ms.
Showing with 2 additions and 1 deletion
+2 -1
......@@ -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);
Supports Markdown
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