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

168
Vistas
How to keep tracking mouse events even when some text is marked up

I have a few mouse event listeners bound to each class instance that draws a canvas. It should listen to changes in mouse events when certain events happen. And it needs to track the mouse events even when the mouse is clicked and moved around the document.

The problem is that sometimes when the mouse is clicked and moving around the screen, it marks up some text, or even just blank space. Then when I keep moving the mouse, the browser displays the "forbidden action" symbol and stops tracking the events.

This is an image of the problem: broken listeners

Each canvas is a class instance and has its own listeners, this is how I set it inside the class:

this.canvas.addEventListener('mousedown', (e) => {
    // code
    }
});

document.documentElement.addEventListener('mouseout', (e) => {
    // code 
    }
});

document.documentElement.addEventListener('mouseover', (e) => {
    // code
    }
});

document.documentElement.addEventListener('mouseup', (e) => {           
    // code
    }            
});
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