0
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-01-18 10:52:19 +01:00

don't show tooltips/popovers whose element isn't in the DOM; fixes #13268

This commit is contained in:
Chris Rebert 2014-06-06 15:34:56 -07:00
parent b23ed1b034
commit 21de05c8c0

View File

@ -145,8 +145,9 @@
if (this.hasContent() && this.enabled) { if (this.hasContent() && this.enabled) {
this.$element.trigger(e) this.$element.trigger(e)
if (e.isDefaultPrevented()) return var inDom = $.contains(document.documentElement, this.$element[0])
var that = this; if (e.isDefaultPrevented() || !inDom) return
var that = this
var $tip = this.tip() var $tip = this.tip()