ftlabs / fastclick

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

Should FastClick be more like a polyfill? #256

Open matthew-andrews opened 10 years ago

matthew-andrews commented 10 years ago

Currently FastClick forces fast-clicks (or perhaps fast-touches) on any page it runs on and it does this on every browser that supports touch - unless the browser is whitelisted and appropriate meta tags are in place.

I wonder whether FastClick should polyfill the exact behaviour we want browsers to implement, ie:-

Clicks should only be fast if the meta viewport contains user-scalable=no or width=device-width. (And do a similar thing for @viewport if browsers implement that without fixing the tap issue).

Also should we switch the logic around from a whitelist to a blacklist? Assume the browser makes clicks fast unless it's known to be 'wrong' - old Chrome, iOS, old Blackberry, etc.

Thoughts?

// @rowanbeentje @jakearchibald @mattcg

Jaybuz commented 10 years ago

A blacklist would definitely make a lot more sense now.