Skip to content
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

close event on dialog tag does not work #457

Closed
Threated opened this issue Feb 3, 2023 · 3 comments
Closed

close event on dialog tag does not work #457

Threated opened this issue Feb 3, 2023 · 3 comments
Labels
bug Something isn't working

Comments

@Threated
Copy link
Contributor

Threated commented Feb 3, 2023

Using on:close on an <dialog> tag does not execute the given callback although it is listed under event listeners in dev tools.
Adding the #[does_not_bubble] attribute to my local leptos source seemed to fix it for me as I saw it was not marked with it and mdn says it does not bubble.
I dont know if there are any other tags that use this event and might break after this change but it seems to be the only real dom element to use some sort of close event.

Link to list of all events
Searching for close there only yields events in WebSocket, RTCDataChannel, IDBDatabase and the HTMLDialogElement.
So I think its pretty save to just add the attribute as all the other usecases are not DOM related.

@gbj
Copy link
Collaborator

gbj commented Feb 3, 2023

Thanks, this is great! Would you like to make a PR with the local change you had that fixed it?

@gbj gbj added the bug Something isn't working label Feb 3, 2023
@Threated
Copy link
Contributor Author

Threated commented Feb 3, 2023

Sure although its just 1 line of code haha

Threated added a commit to Threated/leptos that referenced this issue Feb 3, 2023
@Threated
Copy link
Contributor Author

Threated commented Feb 3, 2023

Made the pull request #460 to fix the issue.

@Threated Threated closed this as completed Feb 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants