Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Great project! Our company has used this repository for several years.
However, we have encountered a problem that inner scrolling will trigger outer scrolling. We read the source code of this project and located the problem.
In the project, e.stoppropagation() and e.preventdefault() are used to prevent outer scrolling. And when "hitsBound", the outer scroll is not prevented.
Here is the code
However, this leads to a problem. When I roll down on the top, because the first lower roll is "hitBound", the outer roll is not prevented, resulting in the inner and outer roll together.
Another problem is that when the touchpad scrolls, there is a slight offset occasionally, resulting in a momentary deltaY=deltaX. This will cause to judge "isLeft" and "isRight" at that moment. This is a very serious problem, which will lead to the inability to stop the external scrolling at that moment. In fact, our page scrolling up and down is much higher than scrolling left and right. I think that when deltaY=deltaX occurs, we should give priority to scrolling up and down rather than left and right
Here is my modified code
Thanks for reading. This problem has brought us some troubles. I also raised a pull request. I hope it can be repaired as soon as possible. Thanks!