finish shadow dom docs

This commit is contained in:
Evan Almloff committed 2023-04-17 12:41:54 -05:00
1 parent baeb4251ba
commit 9877b0f0b1
11 files changed
+123 -69

No files matched your search

+2 -2
View File
@@ -183,7 +183,7 @@ impl FocusState {
if forward {
// find the closest focusable element after the current level
rdom.traverse_depth_first(true, |n| {
rdom.traverse_depth_first(|n| {
let node_level = n.get::<Focus>().unwrap().level;
if node_level != *focus_level
&& node_level.focusable()
@@ -200,7 +200,7 @@ impl FocusState {
});
} else {
// find the closest focusable element before the current level
rdom.traverse_depth_first(true, |n| {
rdom.traverse_depth_first(|n| {
let node_level = n.get::<Focus>().unwrap().level;
if node_level != *focus_level
&& node_level.focusable()
+1 -1
View File
@@ -550,7 +550,7 @@ impl InnerInputState {
// update focus
if was_released {
let mut focus_id = None;
dom.traverse_depth_first(true, |node| {
dom.traverse_depth_first(|node| {
let node_layout = layout
.layout(node.get::<TaffyLayout>().unwrap().node.unwrap())
.unwrap();