Handling both touch and click events in JS has always been a pain, thanks to the way these events interact. Importantly, since there are now many devices where users can both touch AND click, we can't simply switch all events over to touch events if we detect a touch. Here is the sequence these events fire:
touchstart
touchmove
touchend
-- 300ms delay --
mousedown
mousemove
mouseup