Coder Social home page Coder Social logo

Eating clicks on Windows > 7 about fastclick HOT 4 CLOSED

ftlabs avatar ftlabs commented on July 24, 2024
Eating clicks on Windows > 7

from fastclick.

Comments (4)

mattcg avatar mattcg commented on July 24, 2024

I've tested the version tagged at 3.0.0 with Chrome running on Windows 7 in an emulator, with 'emulate touch events' enabled in the web inspector settings. It seems fine now, though this might be a false positive. Waiting for confirmation from the reporter.

from fastclick.

RByers avatar RByers commented on July 24, 2024

Note that we made the decision NOT to delay click events on Chrome desktop (i.e. we don't support double-tap to zoom) precisely so that work-arounds like this library aren't necessary. Was the fix here to just disable support entirely for Chrome desktop UserAgents? That would be ideal. Eg. WebKit does a lot of work to try to generate good click events (eg. adjusting the position of the touch to the most likely element under the finger), so you don't want to intefere with that if you can help it. Unfortunately this is still necessary on Chrome for Android when the page is zoomable, but if I had my way we'd get rid of the delay there too :-)

from fastclick.

mattcg avatar mattcg commented on July 24, 2024

Note that we made the decision NOT to delay click events on Chrome desktop

That's excellent news and thank you for posting this update.

We opted for a more a generic fix instead of checking the user agent. Before the fix, FastClick behaved like this:

  • if window.ontouchstart != undefined, add workaround listeners
  • if a click event is fired without a preceding touchend event, cancel the click

Of course, the unintended effect was that on platforms like Chrome/Windows 7 pages were made unclickable. So now we do this:

  • if window.ontouchstart != undefined, add workaround listeners
  • if a click event is fired without a preceding touchend event, let the click through

This still isn't ideal because we're still adding the workaround listeners even if they're not needed by the device.

from fastclick.

mattcg avatar mattcg commented on July 24, 2024

WebKit does a lot of work to try to generate good click events (eg. adjusting the position of the touch to the most likely element under the finger), so you don't want to intefere with that if you can help it.

I'm with you on this: I can't wait for the day when FastClick won't be needed at all.

from fastclick.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.