Skip to content

Commit

Permalink
Use layout_children for hit testing
Browse files Browse the repository at this point in the history
  • Loading branch information
nicoburns committed Sep 17, 2024
1 parent 215ffc4 commit 5eb9fba
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/dom/src/node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -824,8 +824,10 @@ impl Node {
}

// Call `.hit()` on each child in turn. If any return `Some` then return that value. Else return `Some(self.id).
self.children
self.layout_children
.borrow()
.iter()
.flatten()
.find_map(|&i| self.with(i).hit(x, y))
.or(Some(HitResult {
node_id: self.id,
Expand Down

0 comments on commit 5eb9fba

Please sign in to comment.