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 parent scrolling when child is scrolled #144

Closed
mirzinho opened this issue Jul 2, 2021 · 3 comments
Closed

Prevent parent scrolling when child is scrolled #144

mirzinho opened this issue Jul 2, 2021 · 3 comments
Assignees

Comments

@mirzinho
Copy link

mirzinho commented Jul 2, 2021

I have a container inside a container that both have slimscroll.

Is there a way to prevent parent scrolling while the mouse is scrolling inside the child.

Some option to prevent event bubbling to parent,

@jkuri
Copy link
Owner

jkuri commented Jul 5, 2021

hi @mirzinho I am not sure how to solve this, you should somehow call stopPropagation on that event. did you maybe solve this problem?

@mirzinho
Copy link
Author

mirzinho commented Jul 5, 2021

Unfortunately not yet, been trying to get around it, looking at the jQuery SlimScroll from rochal, that thing has a allowPageScroll: boolean; property that disables page / parent scroll, so i am looking to see how that has been solved.

Maybe you should give it a look..

@jkuri jkuri self-assigned this Jul 10, 2021
@jkuri jkuri closed this as completed in 16e4a17 Jul 10, 2021
@jkuri
Copy link
Owner

jkuri commented Jul 10, 2021

hi @mirzinho, I solved this by adding lock and unlock events. This is now available since version 12.2.0.
You can check live demo here. Let me know if it works for you, when you have time to check it out.

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

No branches or pull requests

2 participants