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 function #33

Merged
merged 3 commits into from
Oct 13, 2020

Conversation

brophdawg11
Copy link
Contributor

Adds support for passing a function for options.preventScroll(event) that will allow runtime determination of which events to call event.preventDefault() for to prevent scrolling. This way usage of swipe left/right can prevent scrolling on swipes that are majority left/right, but not on swipes that are majority up/down.

Closes #32

@umanghome
Copy link
Owner

Looks good. Thanks for adding this! I'll merge and make a release in a bit.

@umanghome umanghome merged commit 866acca into umanghome:master Oct 13, 2020
@umanghome
Copy link
Owner

Released and published in v1.3.0

@brophdawg11 brophdawg11 deleted the prevent-scroll-function branch October 14, 2020 12:29
@brophdawg11
Copy link
Contributor Author

Thanks for the quick turnaround :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow preventScroll to be a function?
2 participants