How to disable zoom when you double tap and increase the responsiveness of the buttons?

Good afternoon.
Is there a web page with a button clicking on which it addition counter. But the scenario of use this web page in 99% of cases will be used with mobile and button huddle sometimes VERY often.

This raises 2 problems:
1) When double tap occurs the approximation of the button (need to kill)
2) the Button does not handle frequent pressing and counters are not added

Button code:
<script type="text/javascript">
 var clicks = localStorage.getItem('clicks') || 0;



 document.addEventListener("DOMContentLoaded", function(){ document.getElementById("clicks").innerHTML = localStorage.getItem('clicks') || 0; });
 function onClick() {
 clicks = +clicks + 1;
 document.getElementById("clicks").innerHTML = clicks;
updateStorage(clicks);
};

 function onReset() {
 if (confirm('are You sure? The data will be reset!')) {
 clicks = 0;
 document.getElementById("clicks").innerHTML = clicks;
updateStorage(clicks);
}
}

 function updateStorage(clicks) {
 localStorage.setItem('clicks', clicks);
}
 </script>
March 23rd 20 at 19:18
1 answer
March 23rd 20 at 19:20
Solution
to prohibit the zoom when double tap

Add touch-action: manipulation css to the element, which is switchable

.disable-double-tap-zoom {
 touch-action: manipulation;
}


Button not working frequent pressing and counters are not added

Treating depression asynchronously
and you can please read more about asynchronous processing, I have not seen this. If no trouble, within my example. - anabel commented on March 23rd 20 at 19:23

Find more questions by tags Web DevelopmentHTMLJavaScript