davidtheclark / react-aria-modal

A fully accessible React modal built according WAI-ARIA Authoring Practices

Home Page:http://davidtheclark.github.io/react-aria-modal/demo/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Modal does not close when clicking the overlay

joeswick999 opened this issue · comments

Modal will not close when clicking the overlay.

https://codesandbox.io/s/kmlr5z5n4o

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

You are right, thank you so much.