Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

304
Visualizações
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 à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda