Update virtual_event_from_websys_event based on make_synthetic_event in the desktop crate

This commit is contained in:
Reinis Mazeiks committed 2022-05-23 10:12:12 +03:00
1 parent 60e74b2ec0
commit f792ed7a17
1 file changed
+4 -4
+4 -4
View File
@@ -178,7 +178,7 @@ fn virtual_event_from_websys_event(
}) })
} }
"keydown" | "keypress" | "keyup" => Arc::new(KeyboardData::from(event)), "keydown" | "keypress" | "keyup" => Arc::new(KeyboardData::from(event)),
"focus" | "blur" => Arc::new(FocusData {}), "focus" | "blur" | "focusout" | "focusin" => Arc::new(FocusData {}),
// todo: these handlers might get really slow if the input box gets large and allocation pressure is heavy // todo: these handlers might get really slow if the input box gets large and allocation pressure is heavy
// don't have a good solution with the serialized event problem // don't have a good solution with the serialized event problem
@@ -258,9 +258,9 @@ fn virtual_event_from_websys_event(
Arc::new(FormData { value, values }) Arc::new(FormData { value, values })
} }
"click" | "contextmenu" | "doubleclick" | "drag" | "dragend" | "dragenter" | "dragexit" "click" | "contextmenu" | "dblclick" | "doubleclick" | "drag" | "dragend" | "dragenter"
| "dragleave" | "dragover" | "dragstart" | "drop" | "mousedown" | "mouseenter" | "dragexit" | "dragleave" | "dragover" | "dragstart" | "drop" | "mousedown"
| "mouseleave" | "mousemove" | "mouseout" | "mouseover" | "mouseup" => { | "mouseenter" | "mouseleave" | "mousemove" | "mouseout" | "mouseover" | "mouseup" => {
Arc::new(MouseData::from(event)) Arc::new(MouseData::from(event))
} }
"pointerdown" | "pointermove" | "pointerup" | "pointercancel" | "gotpointercapture" "pointerdown" | "pointermove" | "pointerup" | "pointercancel" | "gotpointercapture"