Hacker News new | comments | ask | show | jobs | submit login

What's the intended function of the previous functionality? Didn't double-tapping zoom in and out to a specific section? What problem does the delay solve that isn't present on unscalable viewports?



The delay allows webkit to detect a double tap. Otherwise, any element with a click handler would immediately fire, effectively disabling double tapping for their region.


An interesting choice would be to retroactively undo the effects of the single click if a second one was detected.


That sounds interesting at first, but then what happens if say, the element takes you to another page? Then you'd have to go back a page, which would be a clunky experience.


Delay page switches (and other interruptive things) then.


What if it sends an AJAX request? You can't exactly undo them. The browser JS environment is sufficiently complex that "just undo"ing something seems like it would be... complex.


Send GET requests, delay POST.

Yes, the whole architecture would need to good undo-support.


At this point it's a good idea to keep in mind the effort/gains ratio. You're proposing massive changes to JavaScript engines in order to have double tapping work a certain way. Changing the gesture or tweaking the delays might yield a less optimal solution, but the effort is so much closer to 0. If you were going to invest the effort you're proposing into something, would improving this delay be the best knowable use of that effort?


You go down this road until you say to yourself... Ah next version, I'll just at a 350ms delay for now.


A lot of sites out there perform actions on GET requests, though. I just don't see it working out.

In any case, once you start delaying things you ruin the original point of getting rid of the click delay - to make things faster!


You only delay non-idempotent actions.




Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact

Search: