Coder Social home page Coder Social logo

Comments (6)

tylerhowarth avatar tylerhowarth commented on June 10, 2024

According to Google

...mobile browsers will wait approximately 300ms from the time that you tap the button to fire the click event. The reason for this is that the browser is waiting to see if you are actually performing a double tap.

My temporary solution is to include FastClick in to my index.html

Does anyone else think we should include something like FastClick in Framer?

from framer.

tylerhowarth avatar tylerhowarth commented on June 10, 2024

Anyone have thoughts on this?

from framer.

joshpuckett avatar joshpuckett commented on June 10, 2024

Hey Tyler!

So, if you are building something exclusively for mobile devices, you can use the touchStart event, which fires instantly, as opposed to the click event. If you want both click and touch events, but want them to fire immediately on their respective platforms, you'll have to build in an event abstraction. Here's the general idea of how that would work:

if (touchDevice()) {

Events.TouchStart = "touchstart";
Events.TouchEnd = "touchend";
Events.TouchMove = "touchmove";

} else {

Events.TouchStart = "mousedown";
Events.TouchEnd = "mouseup";
Events.TouchMove = "mousemove";

}

view.on(Events.TouchStart, function() {

return console.log("Touch started");

});

from framer.

tylerhowarth avatar tylerhowarth commented on June 10, 2024

@joshpuckett thanks! I will definitely try that out example out, because I end up using framer on web & mobile.

from framer.

koenbok avatar koenbok commented on June 10, 2024

Also, I already built these in (but did not publicly document them yet)
under the global Events object. You can check out events.coffee for more
info.

On Monday, June 17, 2013, Tyler Howarth wrote:

@joshpuckett https://github.com/joshpuckett thanks! I will definitely
try that out example out, because I end up using framer on web & mobile.


Reply to this email directly or view it on GitHubhttps://github.com//issues/33#issuecomment-19519291
.

from framer.

koenbok avatar koenbok commented on June 10, 2024

Fixed with Events.Click

from framer.

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.