react-modal
react-modal copied to clipboard
Middle click on modal causes overlay to ignore next click
Summary:
When the modal is open, middle clicking anywhere on the modal content causes the next click, if on the overlay, to be ignored.
Steps to reproduce:
- Run using
npm start
- Click the button to open the modal
- Middle click or middle drag on the modal content
- Click on the overlay
- The modal does not close
- Click again on the overlay
- The modal does close
Expected behavior:
The modal should close the first time when clicking on the overlay
Link to example of issue:
https://github.com/ericman314/react-modal-test
Additional notes:
The default example on code sandbox does not exhibit this behavior. I tried to create my example on code sandbox but the site wasn't working for me for some reason.
react 16.13.1 react-modal 3.11.2 Chrome 85.0.4183.83 on Ubuntu 18.04