Open paulirish opened 11 years ago
Thanks for this @paulirish. I was under the impression that Chrome was going with user-scalable=no as a flag for disabling double-tap to zoom. Is the idea to abandon this in favor of width=device-width?
Not a problem if so, I'll just modify the existing code in FastClick.notNeeded.
AFAIUI, user-scalable=no will get no more delay. I believe that already landed. This is now a newer patch.
On Thu, Jul 18, 2013 at 5:28 PM, Matthew Caruana Galizia < notifications@github.com> wrote:
Thanks for this @paulirish https://github.com/paulirish. I was under the impression that Chrome was going with user-scalable=nohttps://code.google.com/p/chromium/issues/detail?id=169642#c8as a flag for disabling double-tap to zoom. Is the idea to abandon this in favor of width=device-width?
Not a problem if so, I'll just modify the existing code in FastClick.notNeeded.
— Reply to this email directly or view it on GitHubhttps://github.com/ftlabs/fastclick/issues/138#issuecomment-21195939 .
This new patch eliminates the need for fastclick if width=device-width, but the 300ms delay returns if the user pinch-zooms the page, because double-tap is the gesture to zoom back out.
Although pinch-zooming brings the delay back, width=device-width + Chrome version feels like the best "detect".
As @paulirish says, pages that prevent zooming already avoid the 300ms delay, that will continue to be the case.
Sounds reasonable to me! Another step closer to being able to ditch FastClick altogether....
I'll implement a check for width=device-width + Chrome version in a feature branch, ready to merge in when the change lands.
A late and tangential comment, but just wanted to mention that Firefox/Android also now removes the delay when user-scalable=no and min/max scale are both equal, same as Chrome in those cases. Also seeing if there's any chance to drum up some Webkit love for this optimization https://bugs.webkit.org/show_bug.cgi?id=122212
I'm sure y'all have seen the discussion here: https://code.google.com/p/chromium/issues/detail?id=169642
A patch is currently in review: https://codereview.chromium.org/18850005/
I was wondering if @mattcg has any feedback on the patch. Also curious if this new behavior will introduce any problems to developers using fastclick.
Perhaps in the future, we could identify a UserAgent blacklist that doesn't need to be served fastclick any longer.
cc @jakearchibald