From: Chris Rebert Date: Fri, 6 Jun 2014 22:34:56 +0000 (-0700) Subject: don't show tooltips/popovers whose element isn't in the DOM; fixes #13268 X-Git-Tag: v3.2.0~122^2~10^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=21de05c8c09b0ff9c11651596a84442b312381bb;p=thirdparty%2Fbootstrap.git don't show tooltips/popovers whose element isn't in the DOM; fixes #13268 --- diff --git a/js/tooltip.js b/js/tooltip.js index 3b8ac17f6d..b4ced6d2af 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()