Skip to content

Commit

Permalink
Iterate children in reverse order when hit testing
Browse files Browse the repository at this point in the history
  • Loading branch information
nicoburns committed Nov 10, 2024
1 parent fef1a2c commit 9430af1
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions packages/blitz-dom/src/node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -944,6 +944,7 @@ impl Node {
self.layout_children
.borrow()
.iter()
.rev()
.flatten()
.find_map(|&i| self.with(i).hit(x, y))
.or(Some(HitResult {
Expand Down

0 comments on commit 9430af1

Please sign in to comment.