shoelace-style / shoelace

A collection of professionally designed, every day UI components built on Web standards. SHOELACE IS BECOMING WEB AWESOME 👇👇👇
https://webawesome.com
MIT License
12.95k stars 831 forks source link

sl-show and sl-after-show dialogs events occurring multiple times when hovering over sl-copy-button #2148

Closed steunix closed 2 months ago

steunix commented 2 months ago

Describe the bug

I have an sl-dialog containing a copy of sl-copy-buttons; I need to intercept the sl-copy event on those, so I add the listener on buttons when dialog's "sl-after-show" event fires*. It works, but as soon as I move the mouse over the copy button, another "sl-show" or "sl-after-show" fires, and the copy button loses the listener I've added.

To Reproduce

Browser / OS

Additional information

Events on sl-copy-button works normally outside a sl-dialog