Browse Source

fix the double click event

Evan Almloff 1 year ago
parent
commit
72ae13ccb5
2 changed files with 2 additions and 2 deletions
  1. 1 1
      packages/desktop/headless_tests/events.rs
  2. 1 1
      packages/html/src/events.rs

+ 1 - 1
packages/desktop/headless_tests/events.rs

@@ -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();
     }

+ 1 - 1
packages/html/src/events.rs

@@ -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();
                     }),