Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modals not rendering when LWS security flag is active. #3127

Open
aYolandaBecerra opened this issue Aug 8, 2023 · 4 comments
Open

Modals not rendering when LWS security flag is active. #3127

aYolandaBecerra opened this issue Aug 8, 2023 · 4 comments

Comments

@aYolandaBecerra
Copy link

aYolandaBecerra commented Aug 8, 2023

Hi All,

We are using the Modals from desing-system-react (version 0.10.54) in our proyect, we have detected that when the LWS security flag is active, the modals throw an error and it does not render.

the error leads us to ModalPortals.js. a file inside react-modal lib (version 3.14.3) imported by desing-system-react.

please can you check why its not working with LWS security?

@welcome
Copy link

welcome bot commented Aug 8, 2023

Thanks for opening your first issue! 👋
If you have found this library helpful, please star it. A maintainer will try to respond within 7 days. If you haven’t heard anything by then, please bump this thread.

@interactivellama
Copy link
Contributor

The Modal renders into the body tag. I would estimate that LWS is blocking access to the body tag. You might try a different parentSelector https://react.lightningdesignsystem.com/components/modals/#prop-parentSelector

@konstantinosBlatsoukasRepo
Copy link

konstantinosBlatsoukasRepo commented Oct 20, 2023

Hi all, do we have any news regarding the issue, I face the same problem my react app crashes.
@interactivellama I would like a big favour, can you give a concrete example of the above?
Thanks!

@interactivellama
Copy link
Contributor

parentSelector is an exposed mapping of this function from React Modal. https://reactcommunity.org/react-modal/#using-a-custom-parent-node

pedropbazzo added a commit to pedropbazzo/design-system-react that referenced this issue Dec 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants