Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

296
Vistas
why is deltaY on `wheel` event different between mac and windows?

When I try to get the scroll speed of a user I get inconsistent results between mac and windows.

to reproduce

  1. Open this codesandbox
  2. With a mouse, scroll down 1 "tick" (use a mouse that doesn't have smooth scroll)

problem

Using the exact same hardware (mouse / monitor) and browser (chrome):

  • on Windows I get a value of 125
  • on Mac I get a value of around 12

I need a way to know how fast the user scrolled that gives comparable results for all operating systems.

more context

  • This is for a "infinite canvas" type application (like tldraw). I would like to "zoom out" when the user scrolls backwards and "zoom in" when the user scrolls in.
  • I want to use the scroll speed (and not just the scroll direction) because otherwise it feels clunky
  • I know that it's possible because figma can zoom in/out based on mouse wheel speed. Though they use webgl so not sure if they have access to properties that the normal wheel event doesn't have
  • I can't simply check if deltaY is > 100 because on mac deltaY can get over 100 when the user scrolls fast
  • I tried every solution from this question. None of them worked across mac/windows
about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda