Module 6: Avoiding the 300ms Click Delay


  1. Test the application on your iOS device or in the iOS emulator: Tap the Help button, and notice the delay before the dialog appears.

    This delay occurs because the operating system is waiting roughly 300ms to see if the user is going to tap the target again (and therefore perform a double-tap).

  2. In index.html, add the following script tag:

    <script src="lib/fastclick.js"></script>

    FastClick is an open source library built by the Financial Times. More information here.

  3. In app.js, register FastClick inside the deviceready event handler.

  4. Test the application: Click the Help button. The message should now appear without delay.

comments powered by Disqus