-
-
Notifications
You must be signed in to change notification settings - Fork 78.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix tooltip when hovering a child element (delegateTarget
)
#30928
Conversation
@@ -81,6 +81,17 @@ And with custom HTML added: | |||
</button> | |||
{{< /highlight >}} | |||
|
|||
With an SVG: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Allows to test/demonstrate inside documentation, should be done another way I guess.
Without the delegateTarget fix, it does not show the tooltip when hovering and crashes when mouse leaving.
|
||
spyOn(tooltip, 'show') | ||
|
||
tooltipEl.querySelector('rect').dispatchEvent(createEvent('mouseover', { bubbles: true })) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bubbles: true is important here, otherwise it won't work
67a9192
to
b544f08
Compare
b544f08
to
0cf873d
Compare
0cf873d
to
308fb32
Compare
I tried this fix, it does fix that bug |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good work !
LGTM 👍
delegateTarget
)
delegateTarget
)delegateTarget
)
…0928) Co-authored-by: XhmikosR <[email protected]>
v5
See #30597 (comment) & #30597 (comment)
Before (master):
After (this branch):
Preview: https://deploy-preview-30928--twbs-bootstrap.netlify.app/docs/5.0/components/tooltips/#examples
Fixes #31080