소스 검색

fix the double click event

Evan Almloff 1 년 전
부모
커밋
72ae13ccb5
2개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  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();
                     }),