0
Hello, I am creating a site where one of the pages has a list of various clickable items (such as a ? shop window' of online stores), when clicked will open a modal that will be in front of all content. But if the page has scroll, even with the modal open, it is still possible to interact with the background, and the modal is only occupying half the height, the ideal would be that when opening the modal the background did not roll, and when closing the modal, the scrolling of the page would be activated again.
That is, I need that when clicking the modal button, the scrolling is disabled and when closing the modal, the scrolling is enabled.
I saw some examples with pure html, but not applied in Reactjs. Can anyone help me?
When opening the modal change the CSS position property of the body to Fixed
– Rafael Costa
I understand, if possible you could give me an example of how to do this in Reactjs?
– Luh
It worked! what was missing in my case was installing Jquery. Thank you.
– Luh