diff options
author | Gleb Mazovetskiy <glex.spb@gmail.com> | 2014-09-10 20:55:42 +0400 |
---|---|---|
committer | Gleb Mazovetskiy <glex.spb@gmail.com> | 2014-09-10 20:55:42 +0400 |
commit | 13c00527034691c45397fb8653b8a4c741aa0cd4 (patch) | |
tree | 28fb116683bce444ab19e2418eecc00ed66cddf8 /assets/javascripts/bootstrap/tooltip.js | |
parent | fe4aaa4b8a98e8b2f32f2d2e7f1c616d68417087 (diff) |
rake convert
Diffstat (limited to 'assets/javascripts/bootstrap/tooltip.js')
-rw-r--r-- | assets/javascripts/bootstrap/tooltip.js | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/assets/javascripts/bootstrap/tooltip.js b/assets/javascripts/bootstrap/tooltip.js index e730db6..aa6202f 100644 --- a/assets/javascripts/bootstrap/tooltip.js +++ b/assets/javascripts/bootstrap/tooltip.js @@ -105,6 +105,11 @@ var self = obj instanceof this.constructor ? obj : $(obj.currentTarget).data('bs.' + this.type) + if (self && self.$tip && self.$tip.is(':visible')) { + self.hoverState = 'in' + return + } + if (!self) { self = new this.constructor(obj.currentTarget, this.getDelegateOptions()) $(obj.currentTarget).data('bs.' + this.type, self) @@ -147,7 +152,7 @@ if (this.hasContent() && this.enabled) { this.$element.trigger(e) - var inDom = $.contains(document.documentElement, this.$element[0]) + var inDom = $.contains(this.$element[0].ownerDocument.documentElement, this.$element[0]) if (e.isDefaultPrevented() || !inDom) return var that = this @@ -281,11 +286,11 @@ var $tip = this.tip() var e = $.Event('hide.bs.' + this.type) - this.$element.removeAttr('aria-describedby') - function complete() { if (that.hoverState != 'in') $tip.detach() - that.$element.trigger('hidden.bs.' + that.type) + that.$element + .removeAttr('aria-describedby') + .trigger('hidden.bs.' + that.type) } this.$element.trigger(e) |