Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/twbs/bootstrap.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohann-S <johann.servoire@gmail.com>2017-11-30 12:54:27 +0300
committerJohann-S <johann.servoire@gmail.com>2018-12-05 18:02:59 +0300
commitb16127fc105f159ebd06b02df2853941b2aba67c (patch)
tree45f5a0138c633e0e3aa6bd5357ffef4d14c8bc6f /js/src/tooltip.js
parent850d99bb13b895b83a860c38092755253ceb5b4a (diff)
Allow Tooltips/Popovers to work in shadow DOM
Diffstat (limited to 'js/src/tooltip.js')
-rw-r--r--js/src/tooltip.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/js/src/tooltip.js b/js/src/tooltip.js
index 1c40dfed34..9fa53a71b4 100644
--- a/js/src/tooltip.js
+++ b/js/src/tooltip.js
@@ -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
)