dioxus icon indicating copy to clipboard operation
dioxus copied to clipboard

Support for the `onclose` event handler

Open JustSimplyKyle opened this issue 1 year ago • 2 comments

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.

JustSimplyKyle avatar Sep 15 '24 01:09 JustSimplyKyle

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).

tgrushka avatar Oct 28 '24 05:10 tgrushka

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

JustSimplyKyle avatar Oct 28 '24 07:10 JustSimplyKyle