trap ontouchstart instead of onclick? /dave
On Feb 15, 8:37 am, Matteo <[email protected]> wrote: > I noticed that webkit for iphone adds about 300ms on onclick events. I > found an old post on this group about this curious behavior but no > solution was given. Probably I am reinventing the wheel here, anyway > the solution is just to intercept the finger tap and trigger the event > ontouchend instead of on the standard onclick. > > Here's a demo page, point your iphod (iphone or ipod touch :P ) or > simulator (does not work on standard browser) > tohttp://cubiq.org/dropbox/clickdelay.html > The first button triggers the standard click event (with 300ms lame > delay). The second button casts the same click event but ontouchend > thus eliminating the 300ms delay. > > Have you encountered this issue? Is there an easier solution? > > Cheers > Matteo --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "iPhoneWebDev" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/iphonewebdev?hl=en -~----------~----~----~----~------~----~------~--~---
