aboutsummaryrefslogtreecommitdiff
path: root/js/src/tooltip.js
diff options
context:
space:
mode:
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 1c40dfed3..9fa53a71b 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
)