This article as a novice, write a bad place also please everyone a lot of advice, the following content is just for everyone to encourage the following my solution, but also a personal opinion of me, have different opinions of different solutions friends also please share their solutions.
First of all, we use the Fastclick plug-in's original intention is to solve the "tap" event "point through" bug;fastclick and tap are using the "touch" event to simulate the "click" event;
Then we'll get a general idea of how Fastclick works (from the copy on):
Track all Touchstart events in our app, triggering a click event when a Touchend event is received;
The use of methods can be found Niang;
But the problem, when the use of Fastclick, we found that the "date" control can not be triggered, is a normal click can not be triggered, if the length of the 0.5S is still able to trigger, but the problem has already existed, must be resolved!
By reading Fastclick's source, there's a way to find it.
Anyway, the meaning mentioned above, is to accept the Touchend event, triggering a click event;
So my solution is to:
When touchend we judge his event.target exactly is what, if it is date we do not play, do not you fastclick, with the original to trigger not OK, to a return false;
My Code:
Here if the conditions are casually written slightly, according to the requirements of the project, you want to be to arrive at a special condition when you quit on the good;
This article as a novice, write a bad place also please everyone a lot of advice, the following content is just for everyone to encourage the following my solution, but also a personal opinion of me, have different opinions of different solutions friends also please share their solutions. Thank you for your attention to this article, with your support I will do better.