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
When using touch, if you stop moving your finger it won't snap #100
Comments
So I figured out the issue. I haven't thoroughly tested this yet, but tentatively it's a relatively simple fix. I would give line numbers, but I'm sure they're different at this point. I can submit a pull request as well if you'd like. Inside the definition of scrollStart and scrollStop changes have been made here around like 630: $this.on('touchleave touchcancel touchend', function(event) {
isTouching = false;
/*setTimeout(function () {
clearTimeout(timer);
}, 50);*/
});
$this.on('touchend touchmove scroll', function(event) {//NOTE: Added touchend
if (isTouching && event.type != 'touchend') {//NOTE: Added second condition.
return;
} Ended up being more straightforward than I thought once I found my way through the code. |
Large issue, this only works in Chrome and other webkit browsers. |
Anything new on this? For me this plugin is not working on Chrome on iPhone6 at all ... I love this plugin and would be a shame that it is not working on mobile devices ... |
@tortilaman Thanks for your work on this one! Your fix made it work on mobile devices? I'm looking into updating this plugin the next couple of days. |
@tortilaman even if it only works on webkit browsers, it helps a lot! |
Fixed in 21bcbe9, this will land with the v1.0 release. |
Good to hear this worked out, thanks for the update @guidobouman! |
I am currently looking into this, but figured more eyes is better, so I'm submitting an issue.
Description
So if you're using a touch device or touchpad on a laptop, if you stop scrolling with your finger (keep it still and on the screen / touchpad) before you release it from the surface, it will scroll as per normally, but it won't snap to a panel. Here is how I initialize panelsnap
I realize this is probably a weird initialization, but I'm doing something a little outside the usual, so yeah.
My Findings
I've found that in this situation where there's an issue, the scrollStop() function isn't called, which leads me to believe that the event isn't fired. Perhaps then another event listener needs to be added, or the event listener that this function is bound to needs to be changed.
I'm not intimately familiar with this domain, so I'll do some research and update this if I find a solution. That being said, I'm not sure I will be able to check whether or not this breaks other implementations.
The text was updated successfully, but these errors were encountered: