Skip to content

Drag is passed to background dnd area, even though a button is on top of the dnd area #7767

@bratorange

Description

@bratorange

Describe the bug

To Reproduce
Steps to reproduce the behavior:

  1. create a Drag and drop area.
  2. place a button inside it
  3. try to press the button

Expected behavior
The button is clicked instead of the dnd area in the background being dragged

Screenshots

Image

Desktop (please complete the following information):

  • OS: MacOS
  • Browser EFrame native application
  • Version

Additional context
I suppose the following lines lead to this behavior:
https://github.com/emilk/egui/blob/a0bb4cfef82dd9b50f990f607b7c7c4f28eb8589/crates/egui/src/hit_test.rs#L362C10-L362C47

I think the Problem is, that drag and click actions are both passed through to their respective widgets. Could this be changed or does other behavior depend on this mechanic working the way it works?

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething is broken

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions