Native-like tapping for touch apps

FastClick is a simple, easy-to-use library for eliminating the 300ms delay between a physical tap and the firing of a click event on mobile browsers. The aim is to make your application feel less laggy and more responsive while avoiding any interference with your current logic.

For more information, see this blog post or the official repository on GitHub.

Note: As of late 2015 most mobile browsers no longer have a 300ms touch delay, as long as the website is mobile-optimized, so FastClick offers no benefit, and risks introducing bugs. Consider carefully whether you really need to use it.

See also https://www.drupal.org/project/fastclick/issues/3277920.

Installation instructions

When using Drush, a development version of the library will be automatically downloaded when you enable the module. Command drush fastclick-download is also available.
If you are not using drush:

  • Install Libraries API 2.x
  • Download fastclick.js and place it in sites/all/libraries/fastclick/fastclick.js:
    mkdir -P sites/all/libraries/fastclick
    cd sites/all/libraries/fastclick/
    wget https://raw.github.com/ftlabs/fastclick/master/lib/fastclick.js
  • Install and enable this module

How to use

By default the fastclick behaviour will be in effect in every page of your website.
If you want to attach the library only when you want, set the fastclick_enable_everywhere variable to FALSE. See also Using Libraries API 2.x (as a module-developer).

Note that you can still keep the old click behaviour in specific DOM elements, adding to them the needsclick class. See https://github.com/ftlabs/fastclick for more details and instructions.

Project information

  • caution Seeking new maintainer
    The current maintainers are looking for new people to take ownership.
  • caution No further development
    No longer developed by its maintainers.
  • chart icon270 sites report using this module
  • Created by Pere Orga on , updated
  • shieldStable releases for this project are covered by the security advisory policy.
    Look for the shield icon below.

Releases