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

Add .no-scroll (or similar) class to body when modal is open to prevent body from scrolling #2

Open
sushant-j opened this issue Oct 6, 2017 · 4 comments

Comments

@sushant-j
Copy link

The use case I am working with has a full screen modal, which has content overflowing the container. In this case, when the user scrolls, even the original body is scrolling. This is unwanted behaviour.

Would it be possible for to add either a .no-scroll or similar class to body to prevent scrolling?
(Assuming that class would have overflow-y: hidden).

Thanks!

@egoist
Copy link
Owner

egoist commented Oct 6, 2017

yeah this makes sense, maybe add a prop: isBodyScrollable while you can already achieve this manually

@sushant-j
Copy link
Author

Would you be able to add the said prop, isBodyScrollable?

@egoist
Copy link
Owner

egoist commented Oct 7, 2017

Can you make a pull request? if not I will do it later.

@sushant-j
Copy link
Author

I am not exactly sure how to proceed, so it would be better if you could do it.

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

2 participants