Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drag'nDrop does not support implementing clicked functionality #5538

Open
Verhoef-W opened this issue Dec 29, 2024 · 0 comments
Open

Drag'nDrop does not support implementing clicked functionality #5538

Verhoef-W opened this issue Dec 29, 2024 · 0 comments
Labels
bug Something is broken

Comments

@Verhoef-W
Copy link

Describe the bug
The .clicked method does not work when used on a dnd item.

To Reproduce
Given code below I do not manage to provide additional click functionality for Button A. Button B works.
let dnd = ui.dnd_drag_source(Id::from("dnd_id"), 0, |ui| { let button_a = ui.label("Button A"); if button_a.clicked() { println!("Button A clicked!"); } }); if dnd.response.clicked() { println!("Drag 'n Drop A clicked!"); } let button_b = ui.label("Button B"); if button_b.clicked() { println!("Button B clicked!"); }

Expected behavior
I expect that you can additionally implement click functionality for Button A on top of the drag 'n drop functionality.

Desktop (please complete the following information):

  • OS: Windows 11 Pro
  • Version Egui/Eframe 0.30 or master branch

Additional context
This issue likely is related to issue Functionality of CollapsingHeader and Drag'nDrop conflicting.

@Verhoef-W Verhoef-W added the bug Something is broken label Dec 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something is broken
Projects
None yet
Development

No branches or pull requests

1 participant