I simply would like to implement double tap on my double click event. the problem is doubletap overwrite double click event.
I have no problem running the event double tap on ipad.
It works great with hammer. On desktop dblclick
and doubletap
are both triggered.
So i have to replace dblclick by doubletap ans it is not very clear to read DoubleTap and dblclick be triggered. If I put the two events, my code is executed twice. (http://jsfiddle.net/8vHjj/14/)
var output = document.getElementById("output");
var hammer = new Hammer(output);
hammer.on("doubletap", function() {
output.innerText += " / doubletap";
});
$("#output").on("dblclick", function(){
output.innerText += " / doubleclick";
});
Is there a solution that would have both events?
This topic help me : Hammer.js pan event only for touch devices and not for desktop computer Click+Drag.
To trigger doubleTap only on touch device, we can use inputClass option
I found no API, which explain this option. The doc "hammer" does not mention the "input Class"