-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Tap firing twice #727
Comments
@MadhuSudhanBhaskar I'm the maintainer of Angular Hammer and have been encountering a similar problem. When you get a chance, take a look at my issue (#742) , which details what we believe to be the problem, and compare with your own code/experience. If you find it to be the same I would recommend closing this issue and watching my issue. |
@RyanMullins Did you miss the part of the docs that suggests preventGhostClicks? http://hammerjs.github.io/tips/ https://gist.github.com/jtangelder/361052976f044200ea17 |
Nope. Please read the details of my issue. It's a very different problem related to capturing both TouchEvents and MouseEvents fired from a single click but milliseconds apart. |
@runspired Unless I'm completely misinterpreting the point of PreventGhostClicks, which I view as a way to stop other handlers from being fired when after a Hammer handler responds. |
@runspired this may even be a problem particular to Angular. If it is, it's because of the Angular execution context where it effectively adds a second run loop inside of the JavaScript run loop, so it could be that the secondary mouseup event is being triggered before the PreventGhostClicks functionality in the Angular context has a chance to respond. If that is the case, then the solution I want will eliminate the need for PreventGhostClicks. |
@RyanMullins I think you are misinterpreting PreventGhostClicks, but I agree it should be bundled with Hammer and used by default. Basically, mobile browsers try to pretend that they are normal browsers, so they fire a "click" event a short delay after a "touchEnd". This is great for sites that haven't optimized for mobile, but for sites that do use touchEnd to determine taps/clicks, the extra click event needs to be captured and discarded, otherwise both the touchEnd and the click event will trigger a tap. |
Sounds like I know what I'm working on tomorrow afternoon then. |
@ryan Sure I will check your issue and close mine.
|
Closing in favor of the meta issues for this. |
I am using Angularjs, for events I am using hammer.js . I have a new version on hammer.js on my application. The tap is binded my directive, when I tap or touch on my mobile device its firing twice.
The text was updated successfully, but these errors were encountered: