A
A
Alexey Strukov2016-03-28 21:11:00
css
Alexey Strukov, 2016-03-28 21:11:00

Delay when clicking form buttons on mobile browsers?

Please tell me what is the most relevant way to remove the delay when pressing buttons on mobile browsers? Has a stable css property or simple js code appeared?
Will suit the solution even only for modern browsers without fallbacks.
PS
Do not offer libraries and plugins))

Answer the question

In order to leave comments, you need to log in

2 answer(s)
R
Roman Dvoryanov, 2016-03-29
@pm_wanderer

In jquery there is a touchstart event, it works many times faster than a click

$('link').on('touchstart', function () {
 /* Some Code */
});

In JS, this event is called
ontouchstart Google Blog overcame the delay by adding a ban on site zoom on mobile devices in the meta tag
and adding touch events to the entire page in css
html {
    -ms-touch-action: manipulation;
    touch-action: manipulation;
}

Unfortunately, this does not help on iOS, so a bug has been created on the webkit support forum
https://bugs.webkit.org/show_bug.cgi?id=122212

A
Alexey Strukov, 2016-03-29
@pm_wanderer

And ontouchstart is not entirely correct to use in my opinion. This event is fired whenever the user simply touches the screen. Apparently, you will have to score and just wait until they fix it, adhering to graceful degradation.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question