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

prevent scroll is not working in mobile #31

Open
PrabhakarKotipalli opened this issue Feb 18, 2022 · 5 comments
Open

prevent scroll is not working in mobile #31

PrabhakarKotipalli opened this issue Feb 18, 2022 · 5 comments
Labels
enhancement New feature or request

Comments

@PrabhakarKotipalli
Copy link

I tried this package. I used the prevent scroll attribute. It is working fine in desktop but when i am trying in my mobile I was able to scroll. It is not supported in mobile?

@Etto91
Copy link
Owner

Etto91 commented Feb 18, 2022

Hi, as you can see in this line

if (this.props.preventScroll) {

preventScroll prop is only used in the wheel event.

@PrabhakarKotipalli
Copy link
Author

Is there anyway to prevent user scrolling even in mobile?

@Etto91
Copy link
Owner

Etto91 commented Feb 18, 2022

if you can, could you exactly tell me what you want to do?

@eliezerbaschkier
Copy link

Hi @Etto91 , the package is great and really useful. I was going to open a new issue but saw that this one is really similar. I think that what the other user is saying is that it would be useful to also prevent scrolling when the user swipes.
Maybe it could be a different prop preventScrollSwipe, so that one can choose if the UX is the same when scrolling with the wheel or when swiping in a touch device.

Other thing, taking into account accesibility issues, would be to also be able to prevent scroll when using the keyboard, so that the UX is also the same for those users. This could also be a separate prop.

@Etto91
Copy link
Owner

Etto91 commented Apr 5, 2022

Hi @eliezerbaschkier, thanks for clearing that up. When I have some time I'll do this enhancement. if you want feel free to open a pr :)

@Etto91 Etto91 added the enhancement New feature or request label Apr 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants