davidtheclark / react-aria-modal

A fully accessible React modal built according WAI-ARIA Authoring Practices
http://davidtheclark.github.io/react-aria-modal/demo/
MIT License
1.03k stars 96 forks source link

Modal does not close when clicking the overlay #85

Closed joeswick999 closed 5 years ago

joeswick999 commented 5 years ago

Modal will not close when clicking the overlay.

https://codesandbox.io/s/kmlr5z5n4o

rsnay commented 5 years ago

This appears to be because the #root div element into which the main react component is being rendered has a height of 0, and so no click events are getting captured. Making the root div element fill half of the screen allows the modal to be closed by clicking the overlay in that half of the screen. Updated demo: https://codesandbox.io/s/545v289mwl

joeswick999 commented 5 years ago

You are right, thank you so much.