Giter Club home page Giter Club logo

Comments (7)

benmajor avatar benmajor commented on June 12, 2024

This is the expected behaviour. If you need to prevent this in your application, you can adjust the doubletap_int threshold. By default, it's set to 500ms, but obviously 250ms may be better if you're worried about users triple tapping elements.

Since the interval of 500ms is defaulted for good reason, this isn't an issue with the framework. You will need to handle / limit doubletap events in your application.

from jquery-touch-events.

John-Abruzzi avatar John-Abruzzi commented on June 12, 2024

The interval is not the problem. You should add a setting called cooldown which would be the time between allowed taps.

For example, if you had a cooldown of 500ms, you couldn't use doubletap until 500ms after the previous doubletap.

from jquery-touch-events.

benmajor avatar benmajor commented on June 12, 2024

OK, I had another comment about this issue the other week. I will add a cooldown setting as you suggest, rather than assuming users will handle this in their own code. Thanks for the suggestion.

from jquery-touch-events.

John-Abruzzi avatar John-Abruzzi commented on June 12, 2024

Great, thanks for the update. I think this is a problem that many people are facing, and the cooldown should solve that problem.

from jquery-touch-events.

benmajor avatar benmajor commented on June 12, 2024

OK, I have added in a cooling off period to doubletap events, and the demo shows this to be working as expected:
http://ben-major.co.uk/jquery-mobile-events/

from jquery-touch-events.

John-Abruzzi avatar John-Abruzzi commented on June 12, 2024

Thanks, works 100x better already.

from jquery-touch-events.

benmajor avatar benmajor commented on June 12, 2024

Thanks for your positive words 👍

from jquery-touch-events.

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.