-
Notifications
You must be signed in to change notification settings - Fork 813
Closed
Description
I understand that such questions have already been encountered, but I still haven’t found a solution for my case. I will be grateful to the community for help.
I'm using ReactModal to create a modal window in component MenuModal (parent) . The modal window contains cards with information about products (Card (child) component). The Card component has onClick={(e) => {e.stopPropagation();}} (to call a submenu) which does not allow close the modal window the first time (only the second).
Current Behavior
- You click on the "Open Modal" button
- In the modal window, click on the phrase "Some Text"
- Move the cursor outside the modal window and click (to close the modal window). But there is no closure.
- Click the cursor a second time and the modal window closes
Expected behavior:
Close modal window on first click
Real example
Here is a simplified code, but the gist is clear.
https://codesandbox.io/p/sandbox/magical-dawn-tztk55
Metadata
Metadata
Assignees
Labels
No labels