Wheel Events & Passive Listeners Playground

Scroll the table on the teacher’s board with a wheel or trackpad: deltaY and deltaMode, when preventDefault really holds the scroll (on the table, on window…

Why it matters

Custom zoom, endless canvases (maps, design editors), horizontal carousels and hand-made scrolling all read wheel. Misreading passive and deltaMode makes two classic bugs: "why does my preventDefault do nothing?" and "why is my scrolling so slow on this mouse?".

The key idea

A passive listener cannot cancel the scroll

Common mistakes

Try it in this playground