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

Add noscroll prop #49

Closed codingcircus closed 6 years ago

codingcircus commented 6 years ago

scrollDisabled prop

Background

In some cases, it might happen, that the scroll disabling of the modal causes issues with other functionalities. I ran into this problem a week ago, when I added a google recaptcha into one of my modals.

Proposal

Add a new prop called scrollDisabled for the modal, where the noScroll package can be disabled, if not needed/wanted. To not break any existing functionality, I defaulted this prop to true.

Background

I already wrote an issue on this: https://github.com/davidtheclark/react-aria-modal/issues/46

codingcircus commented 6 years ago

I added the demo now

davidtheclark commented 6 years ago

Thanks @codingcircus. Published in 2.11.0.