Skip to content

ContextualMenu: outside click should be ignored if there is a modal open #1049

@lorumic

Description

@lorumic

When the closeOnOutsideClick prop of the ContextualMenu is true, it should be explicitly checked that there is no modal open before closing the contextual menu on outside click.

This is because, with the current behaviour, a click inside the modal would be captured as outside click for the ContextualMenu, causing that to be closed, and since the modal can be a direct child of that ContextualMenu, it would end up being removed as well. See the problem more clearly in the following screen capture:

Peek 2024-02-29 23-42

Metadata

Metadata

Assignees

No one assigned

    Labels

    Bug 🐛Something isn't workingP3 TriagedIssue has been reviewed as part of legacy backlog grooming (project P3).Triaged: v4Triaged, to be implemented as part of Vanilla v4

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions