Skip to content

Conversation

@mkeeter
Copy link
Contributor

@mkeeter mkeeter commented Dec 22, 2025

#4607 accidentally removed the behavior where – once a menu is open – moving the mouse to another menu opens that one instead (on hover, without requiring a click). This is a pretty easy fix!

@github-actions
Copy link

github-actions bot commented Dec 22, 2025

Preview available at https://egui-pr-preview.github.io/pr/7802-open-menu-on-hover
Note that it might take a couple seconds for the update to show up after the preview_build workflow has completed.

View snapshot changes at kitdiff

@emilk emilk added bug Something is broken egui labels Jan 5, 2026
let inner = Popup::menu(&response)

let mut menu = Popup::menu(&response);
if Popup::is_any_open(ui.ctx()) && response.hovered() {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ideally this should check that the other open menu is of the same group. Maybe @lucasmerlin can help with that?

Currently we get this weird behavior:

Image

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch – I'd be happy to add this if I can get some pointers, but I'm not sure about the concept of menu groups (the word "group" doesn't appear at all in containers/menu.rs)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm. You'd basically need to check if you're in the same MenuBar. Slightly ugly, but we could look up if we are within a MenuBar via UiStack by adding a UiKind::MenuBar and then store the MenuBar id in OpenPopup within memory.
Then, in the MenuButton get the bar id of the currently open popup, if it matches our bar id, open the popup on hover.

Not sure if there is a simpler way but this is the best thing I can come up with right now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something is broken egui

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Menus in MenuBar don't open anymore without a click

3 participants