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.04k stars 96 forks source link

Context not being passed #9

Closed jamesjjk closed 8 years ago

jamesjjk commented 8 years ago

Hi, any child components to the Aria model seem to be loosing their context. It looks like its not being passed through correctly.

Thanks

davidtheclark commented 8 years ago

This does not surprise me, because react-displace is used to take the modal out of its expected DOM position. The modal's contents are subject to a separate ReactDOM.render() call. So I'm not sure there is any way to pass context through. Open to ideas!

tamzinblake commented 8 years ago

https://github.com/facebook/react/issues/4706 ?

tamzinblake commented 8 years ago

(We are also having this problem) - react-router LifeCycle does not play well with react-aria-modal right now.

davidtheclark commented 8 years ago

Thanks for the link. Seems like unstable_renderSubtreeIntoContainer is worth a try.

tamzinblake commented 8 years ago

So I don't know if it's what you want but the linked commit solves it and has a test and this solves my issue.

davidtheclark commented 8 years ago

Very cool, thanks! I will look into this within the next day or two, merge and release!

davidtheclark commented 8 years ago

@thomblake: Do you want to submit a PR to react-displace? Or do you just want me to copy code over?

tamzinblake commented 8 years ago

Sure I'll PR On Jan 27, 2016 8:34 PM, "David Clark" notifications@github.com wrote:

@thomblake https://github.com/thomblake: Do you want to submit a PR to react-displace? Or do you just want me to copy code over?

— Reply to this email directly or view it on GitHub https://github.com/davidtheclark/react-aria-modal/issues/9#issuecomment-175971190 .

davidtheclark commented 8 years ago

Fix published in 2.1.0. Thanks again everybody!

tamzinblake commented 8 years ago

Thanks for getting this out!

@jamesjjk ping In case you're not following this issue and it's still relevant.