Mobile coffee stall: 20 levels to trace, fix and build gesture recognizers for tap, swipe, pinch and long-press. Real touch events, CSS env() safe areas, dvh.
What the levels ask
Watch the event stream: touchstart then a quick touchend at the same position. Pick the gesture.
The stream has two taps in a row within < 300ms. What gesture is detected?
A finger presses one point for 700ms without moving before lifting. What's the gesture?
The finger starts on the left, a few touchmoves go right about ~160px, then a touchend. Which gesture?
This stream: |dy| is much bigger than |dx|, dy negative (upward). The gesture?
Two fingers start far apart (id 1 & id 2), and the distance between them shrinks. Which gesture?
This recognizer triggers a swipe even though the finger only moved 16px (scroll jitter). Fix the distance threshold.
The long-press recognizer fires even when the finger slides 300px slowly over 700ms. That's a pan, not a long-press. Add cancellation on touchmove.
The double-tap recognizer detects a 3rd tap as another double-tap because the counter doesn't reset. Fix it.
This recognizer calls preventDefault on every touchmove (blocking scroll). It should only call it once the gesture is certain, not at the start.
You want to allow native vertical scroll but prevent horizontal (because the carousel uses a horizontal swipe). Fix the CSS string so touch-action is correct.
The pinch recognizer doesn't clean the pointer from the map on touchend → the pinch "sticks" after one finger is lifted. Clean up the state.