-
Notifications
You must be signed in to change notification settings - Fork 70
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
Remove scrollbars from swiping surface #20
Comments
I think this problem comes not from impetus itself. As I can see, you just attached it to the entire |
That's the case for Horizon 3 but not for the upcoming Horizon 4. In the next release we'll be able to set any scene we want. So, if we have scrollbars on this scene, for any reason, the problem would be the same, isn't it? |
That sounds like a really specific edgecase and is maybe better to handle it in your own library... However, I'm not the maintainer, let's wait what @chrisbateman says. Btw. there's no need to measure the scrollbar sizes, instead you could just compare the scrollable container with the current clicked scrollable.addEventListener('mousedown', function(e) {
var isScrollbar = this === e.target
}) |
We can't know in advance if the specified scene has scrollbars. Moreover, I just need to disable swiping when the mouse is over a scrollbar, and not a scrollable content. Because my library can listen to scroll events and swipe events at the same time (and many more). So I've got incompatibilities between scroll and swipe because both events are triggered and it shouldn't be the case. But yeah, let's wait for @chrisbateman 's point of view. For the time, I'll put a fix in my library ^^ |
I don't know if it's intended, but I ran into a problem with my Horizon library. I'm listening to several events and Impetus is triggering swipe event even when the mouse is over the scrollbar. I currently fixed this by automatically measuring the scrollbar width and then listening to mousedown/mouseup to know if we're manually scrolling or not.
The text was updated successfully, but these errors were encountered: