Skip to content

Panic when a drag starts over an already hovered entity #21998

@ickshonpe

Description

@ickshonpe

Bevy version and features

Bevy main

What you did

Run one of these examples and try and drag something:

cargo run --example standard_widgets --features="experimental_bevy_ui_widgets"
cargo run --example ui_drag_and_drop

What went wrong

picking_events doesn't add a dragged over entity to the dragged_over map in PointerButtonState if the drag started with the dragged over entity already hovered . This causes a panic when the pointer is moved and picking_events tries to update the dragging_over state for the hovered entity.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-PickingPointing at and selecting objects of all sortsC-BugAn unexpected or incorrect behaviorP-CrashA sudden unexpected crashP-RegressionFunctionality that used to work but no longer does. Add a test for this!S-Ready-For-ImplementationThis issue is ready for an implementation PR. Go for it!

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions