Skip to content

Correct PopupAnchor::PointerFixed popups usage is not obvious #7625

@vladbat00

Description

@vladbat00

Hi! Some users of bevy_egui reached out to me about the fact that their PopupAnchor::PointerFixed popups don't work. I've never used them myself, but I was able to reproduce their issue, so I started looking into the code to understand the problem.

I found that PopupAnchor::PointerFixed popups can only be used in the combination with the open_memory command, otherwise pointer position to open the popup just won't be passed:

self.ctx.memory_mut(|mem| mem.open_popup_at(id, hover_pos));

This seems to be undocumented (but please correct me if I missed anything) and quite difficult to figure out without reading through the popup code. But it also might be a design issue, cause I'm not sure why PopupAnchor::PointerFixed popups shouldn't open when, for example, we force them to open with OpenKind::Open.

So this issue is either a documentation or a feature request.

Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions