You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
I have a list of labels each in a horizontal_wrapped(), each with a different context menu. Once a line wraps, interactions with the entire previous line get sent to the label that caused the wrapping (either the one starting the next line or the one spanning across the end of the line) and not the correct label on that line.
To Reproduce
I set up a minimal example at https://github.com/ronnodas/mwe-egui-wrap. If you run it, then skip to step 3, otherwise here's a description of the code:
Have a ui.horizontal_wrapped().
Fill it with ui.label()s with context menus, something like:
for i in0..50{let text = format!("Label {i}");
ui.label(&text).context_menu(|ui| ui.label(&text))}
Right click on one of the labels on the first line.
See the context menu for the first element on the second line.
Expected behavior
Right clicking on "Label n" should produce a menu with "Label n".
Desktop (please complete the following information):
OS: WSL (Ubuntu 24.10) on Windows 11
Additional context
This happens on both 0.30.0 and the github version. It also works as expected if you use buttons instead of labels (as the element with the context menu, it doesn't seem to matter what the content of the context menu is).
The text was updated successfully, but these errors were encountered:
This seems related to the note about Label not responding to clicks in the docs for context_menu(), since adding .sense(Sense::click()) eliminates the problem. I suppose this issue can be closed, but maybe that note should be clarified since adding a context menu to a label does work by default.
Describe the bug
I have a list of labels each in a
horizontal_wrapped()
, each with a different context menu. Once a line wraps, interactions with the entire previous line get sent to the label that caused the wrapping (either the one starting the next line or the one spanning across the end of the line) and not the correct label on that line.To Reproduce
I set up a minimal example at https://github.com/ronnodas/mwe-egui-wrap. If you run it, then skip to step 3, otherwise here's a description of the code:
ui.horizontal_wrapped()
.ui.label()
s with context menus, something like:Expected behavior
Right clicking on "Label n" should produce a menu with "Label n".
Desktop (please complete the following information):
Additional context
This happens on both 0.30.0 and the github version. It also works as expected if you use buttons instead of labels (as the element with the context menu, it doesn't seem to matter what the content of the context menu is).
The text was updated successfully, but these errors were encountered: