change prevent default to listen to tab index

This commit is contained in:
Evan Almloff committed 2022-05-04 14:15:07 -05:00
1 parent 4aaf790ae9
commit 749150e22d
1 file changed
+1 -1
+1 -1
View File
@@ -67,7 +67,7 @@ impl NodeDepState for Focus {
let new = Focus {
pass_focus: !node
.attributes()
.any(|a| a.name == "dioxus-prevent-default" && a.value.trim() == "true"),
.any(|a| a.name == "dioxus-prevent-default" && a.value.trim() == "keydown"),
level: if let Some(a) = node.attributes().find(|a| a.name == "tabindex") {
if let Ok(index) = a.value.parse::<i32>() {
if index < 0 {