Skip to content

Commit 6646d1c

Browse files
committed
Add note about Over/Out hierarchy issues
1 parent 469d077 commit 6646d1c

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

crates/bevy_picking/src/events.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -350,6 +350,11 @@ pub struct PickingEventWriters<'w> {
350350
/// receive [`Out`] and then entity B will receive [`Over`]. No entity will ever
351351
/// receive both an [`Over`] and and a [`Out`] event during the same frame.
352352
///
353+
/// When we account for event bubbling, this is no longer ture. When focus shifts
354+
/// between children, parent entities may receive reduntant [`Out`] → [`Over`] pairs.
355+
/// In the context of UI, this is especially problematic. Additional hierarchy-aware
356+
/// events will be added in a future release.
357+
///
353358
/// Both [`Click`] and [`Up`] target the entity hovered in the *previous frame*,
354359
/// rather than the current frame. This is because touch pointers hover nothing
355360
/// on the frame they are released. The end effect is that these two events can

0 commit comments

Comments
 (0)