demo · v136
Drawing Canvas
A pen-input demo that needs both: long pointer captures during a stroke (for smooth drawing across element boundaries), and a real click event when the user taps a tool button without moving. Pre-136 you had to track distance manually; now Chrome delivers the click for you.
Note: the captured-click behaviour ships in Chrome 136. Before that, tapping while a pointer is captured wouldn't fire a synthetic
click event — you had to synthesise it from pointerup if no pointermove arrived.
what we're testing
- While a stroke is in flight, the canvas calls
setPointerCapture(e.pointerId)so the rest of the gesture targets it even if the pointer leaves the canvas. - When the user taps a toolbar button without moving, the click target was the button — but the pointer is captured by the canvas. v136 makes the click event still fire on the button.
- The log distinguishes click events (the new behaviour) from stroke pointermove batches.