You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have defined two web components using your custom-elements crate with leptos as the component framework. The components are very simple to show the bug and are just a button with a click handler. However when embedding both on a site, whenever clicking one of the buttons, two click events are registered (See the video in the repro repo).
If I tried to add the buttons in raw "js", that is, through web-sys with add_event_listener; then only one click event is registered which leads me to think this is a Leptos problem.
You can see a video of the issue here:
Screen.Recording.2024-04-28.at.23.55.58.mov
I hope it makes sense, please tell me if this belongs in the custom-elements repo instead.
Leptos Dependencies
leptos = { version = "0.6.11", features = ["csr"] }
Describe the bug
You can find a repro case here.
I have defined two web components using your custom-elements crate with leptos as the component framework. The components are very simple to show the bug and are just a button with a click handler. However when embedding both on a site, whenever clicking one of the buttons, two click events are registered (See the video in the repro repo).
If I tried to add the buttons in raw "js", that is, through web-sys with add_event_listener; then only one click event is registered which leads me to think this is a Leptos problem.
You can see a video of the issue here:
Screen.Recording.2024-04-28.at.23.55.58.mov
I hope it makes sense, please tell me if this belongs in the custom-elements repo instead.
Leptos Dependencies
To Reproduce
Steps to reproduce the behavior:
Expected behavior
I would expect only one click event being sent when clicking the button
The text was updated successfully, but these errors were encountered: