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:
When the
closeOnOutsideClick
prop of theContextualMenu
istrue
, 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 thatContextualMenu
, it would end up being removed as well. See the problem more clearly in the following screen capture: