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

142
Vistas
In Chrome and Edge, why `mousemove` event is triggered when CLICKING on an inactive browser window?

In my FE, there is an element that listens to mousemove event:

<div (mousedown)="onMouseDown($event)" (mousemove)="onMouseMove($event)">
    ...
</div>

The two functions prints out related strings in console, like "onMouseDown triggered" and "onMouseMove is triggered"

Here is the issue and the steps to reproduce it:

  1. Open my app in a browser window (Either Chrome or Microsoft Edge, but not Firefox).
  2. Switch to another window (another program, folder and so on), after which the browser window of my app should be inactive.
  3. Click on the element mentioned above that listens to mousemove event. Just click on it while the browser window is still inactive. Don't switch back to this window beforehand.
  4. In console, I can see a string "onMouseMove is triggered" is printed.

Why a clicking operation will trigger mousemove event?

This happens in Chrome and Microsoft Edge, but not on Firefox.

Looks like a bug in the browsers' end. Anyone else has seen it before and know how to solve it?

Thanks in advance!

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