Replies: 2 comments 2 replies
-
What you’re seeing is event bubbling. Please check out this post for more info and ways to solve it. https://www.abeautifulsite.net/posts/custom-event-names-and-the-bubbling-problem/ |
Beta Was this translation helpful? Give feedback.
2 replies
-
Cory,As I wrote earlier, I've checked various possibilities (I've managed the bubbling event in other shoelace components without any problem with eventPhase) but in this case it fails.What I'm thinking is that, in the Drawer, there's no way to prevent it from closing because in both hide events, it's too late.I"ll investigate later.ChristianDe : Cory LaViska ***@***.***>Envoyé : mardi, juin 4, 2024 5:31:34 PMÀ : shoelace-style/shoelace ***@***.***>Cc : Christian Denat ***@***.***>; Comment ***@***.***>Objet : Re: [shoelace-style/shoelace] Hovering over `sl-tooltip` inside of an `sl-dialog` triggers dialog events (Discussion #1957)
It's hard to tell without seeing code, but a common pitfall is to not check the event target to make sure you're listening to the right event. Chances are, a nested element's event is triggering the listener.
More info here: https://www.abeautifulsite.net/posts/custom-event-names-and-the-bubbling-problem/
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Describe the bug
Showing a tooltip inside of a
sl-details
element seems to trigger the corresponding hide and show events. It seems to be caused by the events waiting on animations to finish, and - I assume - considering all children animations as well (since the tooltip is faded in and out).To Reproduce
Steps to reproduce the behavior:
Demo
Please see this codepen: https://codepen.io/leonbeon/pen/abxqdqo
You can see events triggering when hovering over the button instead of just showing/hiding via clicking on the summary element.
Browser / OS
Beta Was this translation helpful? Give feedback.
All reactions