mirror of
https://github.com/DioxusLabs/dioxus
synced 2024-09-22 23:32:01 +00:00
feat(events:focus): add missing onfocusin
event
This commit is contained in:
parent
9849f68f25
commit
007d06d602
3 changed files with 7 additions and 2 deletions
|
@ -52,7 +52,7 @@ fn make_synthetic_event(name: &str, val: serde_json::Value) -> Arc<dyn Any + Sen
|
|||
let evt = serde_json::from_value::<KeyboardData>(val).unwrap();
|
||||
Arc::new(evt)
|
||||
}
|
||||
"focus" | "blur" | "focusout" => {
|
||||
"focus" | "blur" | "focusout" | "focusin" => {
|
||||
//
|
||||
Arc::new(FocusData {})
|
||||
}
|
||||
|
@ -118,6 +118,7 @@ fn event_name_from_typ(typ: &str) -> &'static str {
|
|||
"keyup" => "keyup",
|
||||
"focus" => "focus",
|
||||
"focusout" => "focusout",
|
||||
"focusin" => "focusin",
|
||||
"blur" => "blur",
|
||||
"change" => "change",
|
||||
"input" => "input",
|
||||
|
|
|
@ -94,6 +94,9 @@ pub mod on {
|
|||
// onfocusout
|
||||
onfocusout
|
||||
|
||||
// onfocusin
|
||||
onfocusin
|
||||
|
||||
/// onblur
|
||||
onblur
|
||||
];
|
||||
|
@ -1095,7 +1098,7 @@ pub(crate) fn _event_meta(event: &UserEvent) -> (bool, EventPriority) {
|
|||
"keydown" | "keypress" | "keyup" => (true, High),
|
||||
|
||||
// Focus
|
||||
"focus" | "blur" | "focusout" => (true, Low),
|
||||
"focus" | "blur" | "focusout" | "focusin" => (true, Low),
|
||||
|
||||
// Form
|
||||
"change" | "input" | "invalid" | "reset" | "submit" => (true, Medium),
|
||||
|
|
|
@ -204,6 +204,7 @@ pub static BUILTIN_INTERNED_STRINGS: &[&'static str] = &[
|
|||
"onerror",
|
||||
"onfocus",
|
||||
"onfocusout",
|
||||
"onfocusin",
|
||||
"onhashchange",
|
||||
"oninput",
|
||||
"oninvalid",
|
||||
|
|
Loading…
Reference in a new issue