change prevent default to detect on{event} rather than {event}
This commit is contained in:
1 parent
bbe9c1bbf0
commit
53d5ea2f42
1 file changed
+14
-14
+14
-14
@@ -69,20 +69,20 @@ impl NodeDepState for PreventDefault {
|
||||
.find(|a| a.name == "dioxus-prevent-default")
|
||||
.map(|a| a.value)
|
||||
{
|
||||
Some("focus") => PreventDefault::Focus,
|
||||
Some("keypress") => PreventDefault::KeyPress,
|
||||
Some("keyrelease") => PreventDefault::KeyRelease,
|
||||
Some("keydown") => PreventDefault::KeyDown,
|
||||
Some("keyup") => PreventDefault::KeyUp,
|
||||
Some("click") => PreventDefault::Click,
|
||||
Some("mousedown") => PreventDefault::MouseDown,
|
||||
Some("mouseup") => PreventDefault::MouseUp,
|
||||
Some("mouseenter") => PreventDefault::MouseEnter,
|
||||
Some("mouseover") => PreventDefault::MouseOver,
|
||||
Some("mouseleave") => PreventDefault::MouseLeave,
|
||||
Some("mouseout") => PreventDefault::MouseOut,
|
||||
Some("wheel") => PreventDefault::Wheel,
|
||||
Some("contextmenu") => PreventDefault::ContextMenu,
|
||||
Some("onfocus") => PreventDefault::Focus,
|
||||
Some("onkeypress") => PreventDefault::KeyPress,
|
||||
Some("onkeyrelease") => PreventDefault::KeyRelease,
|
||||
Some("onkeydown") => PreventDefault::KeyDown,
|
||||
Some("onkeyup") => PreventDefault::KeyUp,
|
||||
Some("onclick") => PreventDefault::Click,
|
||||
Some("onmousedown") => PreventDefault::MouseDown,
|
||||
Some("onmouseup") => PreventDefault::MouseUp,
|
||||
Some("onmouseenter") => PreventDefault::MouseEnter,
|
||||
Some("onmouseover") => PreventDefault::MouseOver,
|
||||
Some("onmouseleave") => PreventDefault::MouseLeave,
|
||||
Some("onmouseout") => PreventDefault::MouseOut,
|
||||
Some("onwheel") => PreventDefault::Wheel,
|
||||
Some("oncontextmenu") => PreventDefault::ContextMenu,
|
||||
_ => return false,
|
||||
};
|
||||
if new == *self {
|
||||
|
||||
Reference in new issue
Block a user