Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

jQuery Calendar event-clicks not firing with ftLab fast click

I am working with AngularJS calendar (Which is essentially jQuery Full Calendar by Adam Shaw wrapped for angular). Here, the calendar event-item clicks worked both in ipad and desktop fine, until I brought in fastclick.js by ft labs (https://github.com/ftlabs/fastclick). Now, calendar event-item clicks works only on desktop, but not working at all on the ipad!

However, other ng-clicks work fine with fastclick both on desktop and iPad.

I understand how fastclick.js works by simply adding touch-end event listeners and calling click events within them, and cannot understand why this would fail with calendar event-item clicks.

Note: I tried using ngTouch instead of fastclick, but their, the ng-click doesn't become fast. According to google, ngTouch's ng-click cannot be used with jQuery

like image 612
Tharaka Avatar asked Dec 19 '13 05:12

Tharaka


2 Answers

if all else fails you can inspect which events are linked to your elements with visual event: http://www.sprymedia.co.uk/article/visual+event This adds an overlayer to any web page and let you visually inspect the JS code that's linked to an element (it shows you the piece of code in a pop up).

this way you can easily see if everything is set up correctly.

PS: I have no link to this tool or it's makers.

like image 82
Ruben Verschueren Avatar answered Sep 18 '22 17:09

Ruben Verschueren


I had similar issue. fastclickjs blocks every jQuery .click() . But if you dispatch event without jQuery everything works fine.

like image 35
Martin Dejmek Avatar answered Sep 20 '22 17:09

Martin Dejmek