-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Not able to open context menu in drag and drop demo by right-click #2471
Comments
I think these are the relevant parts of the code: This sets the drag flag on pointer down: egui/crates/egui/src/context.rs Lines 699 to 721 in 7215fdf
And this whole block handles interactions on overlapping widgets: egui/crates/egui/src/context.rs Lines 557 to 611 in 7215fdf
I feel like the drag should start when you move the pointer with the primary button down, and not when you press any button, but when I make the change, it doesn't fix the context menu in the drag and drop demo. I think the problem is that the drag_source adds another layer on top of the widget to check for interactions on it, and then it blocks interactions with the widget itself. |
This seems to be related to #578, I remember this working at one point, but I haven't worked on this for quite some time. |
Describe the bug
I am using code inspired by the drag and drop demo, and since updating from egui
0.19.0
to the most recent version, the context menu of the items seems not to work as expected anymore. I re-created this on egui.rs (accessed 2022-12-17). When right-clicking onItem B
(see video below, mouse pointer unfortunately not visible in the recording), a context menu with aRemove
button as peregui/crates/egui_demo_lib/src/demo/drag_and_drop.rs
Line 135 in 6ae4bc4
New Item
option appears.Screencast.from.2022-12-17.10-56-00.webm
To Reproduce
Steps to reproduce the behavior:
The text was updated successfully, but these errors were encountered: