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

onTap should not be triggered when tap occurs to stop momentum scrolling #55

Open
slorber opened this issue Aug 5, 2015 · 1 comment
Labels

Comments

@slorber
Copy link
Contributor

slorber commented Aug 5, 2015

When an user is scrolling on a mobile there's "momentum scrolling" effect that makes the content continue to scroll even after the touchend event, according to the movement velocity (also called "fling scroll")

Often, the user may want to stop that momentum scrolling by tapping the screen. He does not care what he taps on, he just want to stop scrolling. But unfortunatly when the scrollable content has a lot of onTap listeners, the probability to trigger one of them is high and the user ends up opening unintentionally new popups / menus / content...

Other references on this issue here:
http://stackoverflow.com/questions/27040241/detect-if-a-touchstart-touchend-has-cancelled-a-scroll-momentum-scroll
http://stackoverflow.com/questions/10573080/mobile-safari-vertical-scrolling-how-to-detect-when-the-window-has-stopped-mov

It seems a workaroud has been implemented for FastClick#42
and the commit is here:
ftlabs/fastclick@2a31072

I may have time to work on this as we need it at at work some point, just tell me if you agree with the idea

@dcousens
Copy link
Collaborator

dcousens commented May 8, 2017

PRs welcome...

@dcousens dcousens closed this as completed May 8, 2017
@dcousens dcousens reopened this May 8, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants