react-modal icon indicating copy to clipboard operation
react-modal copied to clipboard

Middle click on modal causes overlay to ignore next click

Open ericman314 opened this issue 3 years ago • 0 comments

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:

  1. Run using npm start
  2. Click the button to open the modal
  3. Middle click or middle drag on the modal content
  4. Click on the overlay
  5. The modal does not close
  6. Click again on the overlay
  7. 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

ericman314 avatar Aug 28 '20 20:08 ericman314