Mousewheel scrolling event in Mozilla

Did you know that Mozilla doesn’t fire the scroll event when you scroll a page with the mousewheel? Pretty annoying, that. However, I have just discovered that it does fire the DOMMouseScroll event. So, if you’re annoyed that using the mouse wheel doesn’t give you a scroll event, trap the DOMMouseScroll event instead, with window.addEventListener('DOMMouseScroll', scroll_function, false). Quite why this inconsistency exists escapes me a bit, but now there’s a solution.

I'm currently available for hire, to help you plan, architect, and build new systems, and for technical writing and articles. You can take a look at some projects I've worked on and some of my writing. If you'd like to talk about your upcoming project, do get in touch.

More in the discussion (powered by webmentions)

  • (no mentions, yet.)