fix the double click event

This commit is contained in:
Evan Almloff 2024-02-05 18:24:21 -06:00
parent f8003fd9ea
commit 72ae13ccb5
2 changed files with 2 additions and 2 deletions

View file

@ -205,7 +205,7 @@ fn app() -> Element {
r#"new FocusEvent("focusout",{bubbles: true})"#,
);
if received_events() == 12 {
if received_events() == 13 {
println!("all events recieved");
desktop_context.close();
}

View file

@ -14,7 +14,7 @@ macro_rules! impl_event {
#[inline]
pub fn $name<E: crate::EventReturn<T>, T>(mut _f: impl FnMut(::dioxus_core::Event<$data>) -> E + 'static) -> ::dioxus_core::Attribute {
::dioxus_core::Attribute::new(
stringify!($name),
impl_event!(@name $name $($js_name)?),
::dioxus_core::AttributeValue::listener(move |e: ::dioxus_core::Event<crate::PlatformEventData>| {
_f(e.map(|e|e.into())).spawn();
}),