RandallB
RandallB

Reputation: 5565

Hammerjs double firing on iPad

Seeing a weird issue where HammerJS + Angular makes events double fire on 'tap'.

The source / demo: http://plnkr.co/edit/yjtZsQjRPwiuc8FuM3SO?s=hi&p=preview

On a computer, clicking is one event. On an iPad, tapping is two events. Why? How can I fix?

Upvotes: 1

Views: 258

Answers (2)

irukavina
irukavina

Reputation: 426

It seems that the problem stems from HammerJS listening to both touchstart and mousedown events (look at line 351 in hammer.js).

More info at: https://github.com/EightMedia/hammer.js/issues/234

I would suggest you use the angular-gestures module, I've used it and haven't run into this issue: https://github.com/wzr1337/angular-gestures

Upvotes: 2

RandallB
RandallB

Reputation: 5565

So the issue is something to do with jquery. It's unclear where the specific issue lies, but not using Hammer + JQuery solved the issue.

Upvotes: 0

Related Questions