fix the double click event

This commit is contained in:
Evan Almloff 2024-01-08 13:10:09 -06:00
parent fb40e72520
commit 438c03ad68

View file

@ -78,7 +78,7 @@ impl_event! {
#[deprecated(since = "0.5.0", note = "use ondoubleclick instead")]
ondblclick
// ondoubleclick: "ondblclick"
ondoubleclick: "ondblclick"
/// onmousedown
onmousedown
@ -104,22 +104,6 @@ impl_event! {
onmouseup
}
#[inline]
pub fn ondoubleclick<'a, E: crate::EventReturn<T>, T>(
_cx: &'a ::dioxus_core::ScopeState,
mut _f: impl FnMut(::dioxus_core::Event<MouseData>) -> E + 'a,
) -> ::dioxus_core::MountedAttribute<'a> {
::dioxus_core::Attribute::new(
"ondblclick",
_cx.listener(move |e: ::dioxus_core::Event<MouseData>| {
_f(e).spawn(_cx);
}),
None,
false,
)
.into()
}
impl MouseData {
/// Create a new instance of MouseData
pub fn new(inner: impl HasMouseData + 'static) -> Self {