components icon indicating copy to clipboard operation
components copied to clipboard

Fastclick

Open jelbourn opened this issue 10 years ago • 12 comments

Some devices still have a 300ms delay between a touch event and a click event being fired, so we'll need a fastclick implementation to prevent this.

jelbourn avatar Apr 04 '16 22:04 jelbourn

Any progress on this implementation? I am finding an issue being able to click (for example) checkboxes when I include the fastclick.js library in my ng2 / material project.

tgrosh avatar Nov 17 '16 13:11 tgrosh

Do you mean just the Android Browser or something else? iOS 9.3+, Chrome for Android & recent Windows Phone don't need it. If any FastClick solution gets developed it's important to be able to opt out of it if none of the supported platforms in a project need it.

mgol avatar Dec 12 '16 14:12 mgol

See Ionic's tappable directive

wbhob avatar Feb 02 '17 19:02 wbhob

I guess this will be a major deal for PWA´s.. I was kind of surprised to see a delay when running chrome on iOS 10.3.1.

mackelito avatar Apr 16 '17 20:04 mackelito

@mackelito Some basic conditions need to be met to disable the delay; they're mostly common between various mobile operating systems. You either need specify "width=device-width" in a viewport or "touch-action: manipulation" in CSS.

mgol avatar Apr 17 '17 09:04 mgol

@mgol I currently have this in my index.html <meta name="viewport" content="width=device-width, initial-scale=1"> Is the initial-scale messing things up?

mackelito avatar Apr 18 '17 08:04 mackelito

It shouldn't IMO (unless you zoom in) but it's probably better to be explicit and specify:

:root {
    touch-action: manipulation;
}

instead of relying on heuristics that may not always work. This is described in the document linked to in the original post.

mgol avatar Apr 19 '17 12:04 mgol

Just tried it an I´m still seeing a lag when clicking things? :( Note that the lag only occurs when I have used the "Add to homescreen" feature in Safari. Using chrome/safari produces no lag.

mackelito avatar Apr 19 '17 13:04 mackelito

Hey guys, I'm having the same exact problem when used the "Add to homescreen" feature in Safari. (fullscreen webapp using ) Using chrome/safari produces no lag for me as well.

This is really important and because of this issue, my "Cordova" app is running really sluggish and I can say it's not because material 2 is slow but only because of this delay.

geelus avatar Jul 03 '17 04:07 geelus

Closing this since the whole thing isn't really necessary w/ modern mobile browsers. https://developers.google.com/web/updates/2013/12/300ms-tap-delay-gone-away

jelbourn avatar Sep 26 '17 23:09 jelbourn

Hi Jelbourn This should not be closed because it's still a major issue on iPad and iPhone. Here is to see the issue in practice:

1- Navigate to a page with which is designed for mobile on any iPad or iPhone (using Safari) 2- Create an icon on screen using the "Add to home screen" option. 3- Close Safari and run the app using the icon on your screen.

You can see that this issue still exists and unless you would like to ignore this issue, IMO this should not be closed.

Thanks, Morteza

geelus avatar Sep 27 '17 03:09 geelus

This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.