aboutsummaryrefslogtreecommitdiff
path: root/js/tooltip.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/tooltip.js')
-rw-r--r--js/tooltip.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/js/tooltip.js b/js/tooltip.js
index 3b8ac17f6..b4ced6d2a 100644
--- a/js/tooltip.js
+++ b/js/tooltip.js
@@ -145,8 +145,9 @@
if (this.hasContent() && this.enabled) {
this.$element.trigger(e)
- if (e.isDefaultPrevented()) return
- var that = this;
+ var inDom = $.contains(document.documentElement, this.$element[0])
+ if (e.isDefaultPrevented() || !inDom) return
+ var that = this
var $tip = this.tip()