How long is a long tap?

Viewed 11

As I understand it, there is no "long tap" event in JavaScript - this isn't a huge problem because I can start a timer on "touchstart" and check to see if the user it still interacting with the same element after X seconds. My question is: how long is X seconds?

The reason I ask this is that it seems to be possible to adjust the duration on an Android device but is there a list of times for the various options? Ideally, is there a JavaScript request of some kind that I can make to find out how long that duration is (or, at least, which option the user has chosen)? I'd like the duration of my timer to match the user's device for the sake of consistency, but I'd also like to honour any user preference for a shorter or longer duration, if possible.

A follow-up question (which might be a little out-of-scope and better asked in another part of the Stack Exchange, to be fair) is: is the idea of a "long tap" understood by all touch-enabled device users, such as those that use iPhones and iPads? (I'm an Android man and it's second nature to me, but I don't know how how unique I am.)

0 Answers
Related