From 734b6acf132d339995462b8949ab1d2fc9524cd1 Mon Sep 17 00:00:00 2001 From: fat Date: Sat, 17 Aug 2013 20:28:58 -0700 Subject: add small fix for tooltip consistency + fix customizer syntax issue --- js/tooltip.js | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'js/tooltip.js') diff --git a/js/tooltip.js b/js/tooltip.js index e0732a5a9..89802287a 100644 --- a/js/tooltip.js +++ b/js/tooltip.js @@ -108,10 +108,11 @@ clearTimeout(self.timeout) + self.hoverState = 'in' + if (!self.options.delay || !self.options.delay.show) return self.show() - self.hoverState = 'in' - self.timeout = setTimeout(function () { + self.timeout = setTimeout(function () { if (self.hoverState == 'in') self.show() }, self.options.delay.show) } @@ -122,10 +123,11 @@ clearTimeout(self.timeout) + self.hoverState = 'out' + if (!self.options.delay || !self.options.delay.hide) return self.hide() - self.hoverState = 'out' - self.timeout = setTimeout(function () { + self.timeout = setTimeout(function () { if (self.hoverState == 'out') self.hide() }, self.options.delay.hide) } @@ -258,7 +260,9 @@ var $tip = this.tip() var e = $.Event('hide.bs.' + this.type) - function complete() { $tip.detach() } + function complete() { + if (that.hoverState != 'in') $tip.detach() + } this.$element.trigger(e) -- cgit v1.2.3