Read original post by Jeff Brand at SlickThought.Net
I have an app I am working on that requires an element on the page respond to both a click and double click event. In my case, when the user clicks or taps the element, I add a new element to the UI. If the user double clicks the target element, then I want to add a different element. This seems like something that would be a very common occurrence in a touch-centric application.
As you probably already know, when you wire up both events to an element, it will process both the click and double click event handlers when you double click the element. To be specific, the click event handler is called and then the double click handler is called. This is certainly not the desired behavior when I wire up both events, and it’s disappointing there is not a built-in way to handle things correctly. Fortunately, there is a pretty easy way to handle this so that only one event actually gets acted on.