canonical / canonical/react-components
`ContextualMenu`: outside click should be ignored if there is a modal open
- Dominant language
- TypeScript
- Stars
- 151
- Forks
- 74
- Avg merge
- 1d 2h
- Merged PRs (30d)
- 11
Description
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:

Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.