1
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-09-26 21:39:08 +02:00

Allow Tooltips/Popovers to work in shadow DOM

This commit is contained in:
Johann-S
2017-11-30 10:54:27 +01:00
parent 850d99bb13
commit b16127fc10
6 changed files with 86 additions and 2 deletions

View File

@@ -244,8 +244,9 @@ class Tooltip {
if (this.isWithContent() && this._isEnabled) {
$(this.element).trigger(showEvent)
const shadowRoot = Util.findShadowRoot(this.element)
const isInTheDom = $.contains(
this.element.ownerDocument.documentElement,
shadowRoot !== null ? shadowRoot : this.element.ownerDocument.documentElement,
this.element
)