fix desktop events

This commit is contained in:
Evan Almloff committed 2023-08-28 16:37:19 -05:00
1 parent bd387d601c
commit 8ba1c05a93
12 files changed
+507 -217

No files matched your search

+8 -1
View File
@@ -53,6 +53,8 @@
// - Do the VDOM work during the idlecallback
// - Do DOM work in the next requestAnimationFrame callback
use std::rc::Rc;
pub use crate::cfg::Config;
#[cfg(feature = "file_engine")]
pub use crate::file_engine::WebFileEngineExt;
@@ -276,7 +278,12 @@ pub async fn run_with_props<T: 'static>(root: fn(Scope<T>) -> Element, root_prop
// Dequeue all of the events from the channel in send order
// todo: we should re-order these if possible
while let Some(evt) = res {
dom.handle_event(evt.name.as_str(), evt.data, evt.element, evt.bubbles);
dom.handle_event(
evt.name.as_str(),
Rc::new(evt.data),
evt.element,
evt.bubbles,
);
res = rx.try_next().transpose().unwrap().ok();
}