add bubbling data to events after merge

This commit is contained in:
Evan Almloff committed 2022-06-22 14:24:03 -05:00
1 parent 11d9a7d013
commit 2d45e1dc8d
2 files changed
+5

No files matched your search

+2
View File
@@ -6,6 +6,7 @@ use std::any::Any;
use std::sync::Arc;
use dioxus_core::{ElementId, EventPriority, UserEvent};
use dioxus_html::event_bubbles;
use dioxus_html::on::*;
#[derive(serde::Serialize, serde::Deserialize)]
@@ -46,6 +47,7 @@ pub fn trigger_from_serialized(val: serde_json::Value) -> UserEvent {
scope_id: None,
element: mounted_dom_id,
data: event,
bubbles: event_bubbles(name),
}
}
+3
View File
@@ -187,6 +187,7 @@ impl InnerInputState {
name: "focus",
element: Some(id),
data: Arc::new(FocusData {}),
bubbles: event_bubbles("focus"),
});
resolved_events.push(UserEvent {
scope_id: None,
@@ -194,6 +195,7 @@ impl InnerInputState {
name: "focusin",
element: Some(id),
data: Arc::new(FocusData {}),
bubbles: event_bubbles("focusin"),
});
}
if let Some(id) = old_focus {
@@ -203,6 +205,7 @@ impl InnerInputState {
name: "focusout",
element: Some(id),
data: Arc::new(FocusData {}),
bubbles: event_bubbles("focusout"),
});
}
}