Merge branch 'master' of https://github.com/DioxusLabs/dioxus into rusty-events

 Conflicts:
	packages/html/src/events.rs
	packages/tui/src/hooks.rs
This commit is contained in:
Reinis Mazeiks committed 2022-06-28 21:09:20 +03:00
commit f3fcec2bdf
87 files changed
+6230 -868

No files matched your search

+88
View File
@@ -1443,3 +1443,91 @@ pub(crate) fn _event_meta(event: &UserEvent) -> (bool, EventPriority) {
_ => (true, Low),
}
}
pub fn event_bubbles(evt: &str) -> bool {
match evt {
"copy" => true,
"cut" => true,
"paste" => true,
"compositionend" => true,
"compositionstart" => true,
"compositionupdate" => true,
"keydown" => true,
"keypress" => true,
"keyup" => true,
"focus" => false,
"focusout" => true,
"focusin" => true,
"blur" => false,
"change" => true,
"input" => true,
"invalid" => true,
"reset" => true,
"submit" => true,
"click" => true,
"contextmenu" => true,
"doubleclick" => true,
"dblclick" => true,
"drag" => true,
"dragend" => true,
"dragenter" => false,
"dragexit" => false,
"dragleave" => true,
"dragover" => true,
"dragstart" => true,
"drop" => true,
"mousedown" => true,
"mouseenter" => false,
"mouseleave" => false,
"mousemove" => true,
"mouseout" => true,
"scroll" => false,
"mouseover" => true,
"mouseup" => true,
"pointerdown" => true,
"pointermove" => true,
"pointerup" => true,
"pointercancel" => true,
"gotpointercapture" => true,
"lostpointercapture" => true,
"pointerenter" => false,
"pointerleave" => false,
"pointerover" => true,
"pointerout" => true,
"select" => true,
"touchcancel" => true,
"touchend" => true,
"touchmove" => true,
"touchstart" => true,
"wheel" => true,
"abort" => false,
"canplay" => true,
"canplaythrough" => true,
"durationchange" => true,
"emptied" => true,
"encrypted" => true,
"ended" => true,
"error" => false,
"loadeddata" => true,
"loadedmetadata" => true,
"loadstart" => false,
"pause" => true,
"play" => true,
"playing" => true,
"progress" => false,
"ratechange" => true,
"seeked" => true,
"seeking" => true,
"stalled" => true,
"suspend" => true,
"timeupdate" => true,
"volumechange" => true,
"waiting" => true,
"animationstart" => true,
"animationend" => true,
"animationiteration" => true,
"transitionend" => true,
"toggle" => true,
_ => panic!("unsupported event type {:?}", evt),
}
}
+1 -1
View File
@@ -110,7 +110,7 @@ impl From<&MouseEvent> for MouseData {
ElementPoint::new(e.offset_x().into(), e.offset_y().into()),
PagePoint::new(e.page_x().into(), e.page_y().into()),
),
Some(MouseButton::from_web_code(e.button().into())),
Some(MouseButton::from_web_code(e.button())),
decode_mouse_button_set(e.buttons()),
modifiers,
)