ftlabs / fastclick

Polyfill to remove click delays on browsers with touch UIs
MIT License
18.66k stars 3.23k forks source link

WebKit Fast-tap #444

Open madskonradsen opened 8 years ago

madskonradsen commented 8 years ago

According to WebKit, they now respect non-scaleable pages, and don't set the 350ms delay. Will this affect pages running with FastClick(for example, result in double-clicks)?

https://webkit.org/blog/5610/more-responsive-tapping-on-ios/

cvrebert commented 8 years ago

Also, could support for this fast-tapping be detected, and could fastclick.js disable itself in that case? Seems like you could check for (is_iOS && supportsCssProperty('touch-action')), given that touch-action support ought to land in the same release as the viewport heuristic.

NickColley commented 8 years ago

With this being shipped earlier than expected (https://developer.apple.com/library/prerelease/mac/releasenotes/General/WhatsNewInSafari/Articles/Safari_9_1.html#//apple_ref/doc/uid/TP40014305-CH10-SW1) it'd be good to get this patch in, or at the very least update the docs so say Fastclick isnt needed on modern browsers! (Love the work done and its invaluable but yay)

cvrebert commented 8 years ago

@nickcolley But we don't yet know whether iOS 9.3 has Safari 9.1, do we?

NickColley commented 8 years ago

According to Dean it's in the latest beta, so looks promising, https://twitter.com/grorgwork/status/686711911589609472

RMMJR commented 8 years ago

It looks like as long as you have the property set to -webkit-touch-action: manipulation on the element being touched the initial zoom coild be set to a global 1, or it must have both implimented.

piperchester commented 7 years ago

Running iOS 9.3.5 and not able to see the effects of touch-action: manipulation on Safari Mobile.

User agent string says that I'm running Safari 9.0 -- are all iOS 9.x devices not able to use touch-action?

cvrebert commented 7 years ago

Works in 9.3 according to http://caniuse.com/#feat=css-touch-action See also https://patrickhlauke.github.io/touch/tests/results/#suppressing-300ms-delay

piperchester commented 7 years ago

Thanks for the quick response @cvrebert. I'm trying to apply touch-action: manipulation to an input field and still see the 300ms delay before keyboard and cursor appear.

Do I need to apply it to a container as well? Are there any other gotchas here? It's deeply nested within divs, and meta-tag also has the recommended device-width settings so I'm not sure what the issue is.