mirror of
https://github.com/DioxusLabs/dioxus
synced 2024-11-10 14:44:12 +00:00
fix the double click event
This commit is contained in:
parent
f8003fd9ea
commit
72ae13ccb5
2 changed files with 2 additions and 2 deletions
|
@ -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();
|
||||
}
|
||||
|
|
|
@ -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();
|
||||
}),
|
||||
|
|
Loading…
Reference in a new issue