Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
marc2332 committed Feb 15, 2024
1 parent f689212 commit 675618f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions crates/core/src/events/events_measurer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ fn measure_dom_events(
found_nodes.push((node_id, valid_event));

// Stack events that do not bubble up
if !event.does_bubble() {
if event.does_bubble() {
continue 'event;
}
}
Expand All @@ -240,10 +240,10 @@ fn measure_dom_events(

let Style { background, .. } = &*node.get::<Style>().unwrap();

if background != &Fill::Color(Color::TRANSPARENT) && !event.does_bubble() {
if background != &Fill::Color(Color::TRANSPARENT) && event.does_bubble() {
// If the background isn't transparent,
// we must make sure that next nodes are parent of it
// This only matters for pointer-based events, and not to e.g keyboard events
// This only matters for events that bubble up (e.g cursor movement events)
child_node = Some(*node_id);
}
}
Expand Down

0 comments on commit 675618f

Please sign in to comment.