Fix as web event (#3178)

This commit is contained in:
Evan Almloff authored and GitHub committed 2024-11-06 23:53:56 -05:00
1 parent 416811ba3a
commit 5186d8dded
15 files changed
+16 -32

No files matched your search

+2 -4
View File
@@ -94,8 +94,7 @@ impl WebEventExt for dioxus_html::ScrollData {
#[inline(always)]
fn try_as_web_event(&self) -> Option<Self::WebEvent> {
self.downcast::<Synthetic<web_sys::Event>>()
.map(|e| e.event.clone())
self.downcast::<web_sys::Event>().cloned()
}
}
@@ -104,7 +103,6 @@ impl WebEventExt for dioxus_html::WheelData {
#[inline(always)]
fn try_as_web_event(&self) -> Option<Self::WebEvent> {
self.downcast::<Synthetic<web_sys::WheelEvent>>()
.map(|e| e.event.clone())
self.downcast::<web_sys::WheelEvent>().cloned()
}
}