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

Support for the onclose event handler #2962

Open
JustSimplyKyle opened this issue Sep 15, 2024 · 2 comments
Open

Support for the onclose event handler #2962

JustSimplyKyle opened this issue Sep 15, 2024 · 2 comments
Labels
enhancement New feature or request html Related to the html crate

Comments

@JustSimplyKyle
Copy link

Feature Request

Support for the onclose event handler
https://developer.mozilla.org/zh-TW/docs/Web/API/HTMLDialogElement/close_event

Used with the dialog Element.

@tgrushka
Copy link

Yes, how does one use the dialog HTML element in Dioxus? Trying to figure this out because unfortunately, the standard authors required the JavaScript showModal method to be called to show a dialog rather than allow it to be declarative. So trying to figure out how to use web-sys crate with -F (feature) HtmlDialogElement. Hoping to utilize the new dialog modal web paradigm for hopefully better out-of-the-box accessibility. Would be great to have some examples in Dioxus docs where it specifies to use web-sys or gloo crate (I didn't find anything in gloo re: the dialog element -- just the standard alert, etc. methods which are different).

@JustSimplyKyle
Copy link
Author

For me, I just use the JavaScript in eval(), one major issue for this is, I don't know when the modal is closed by user using esc, other than that, seems finem

@ealmloff ealmloff added enhancement New feature or request html Related to the html crate labels Oct 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request html Related to the html crate
Projects
None yet
Development

No branches or pull requests

3 participants