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.
I should be able to bind the event at page startup, like I do for any other tag, but someway it does not work for sl-copy-button
To Reproduce
Create a dialog containing sl-copy-button
on page load event, add a listener for "sl-copy" event
Show the dialog
Move the mouse over the sl-copy-button element
Another sl-show / sl-after-show event is fired, and the listener on "sl-copy-button" is lost
Browser / OS
OS: Windows
Browser: Chrome
Browser version: 128
Additional information
Events on sl-copy-button works normally outside a sl-dialog
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