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

200
Vistas
How to ignore right click on Easel JS

I am working on Easel JS and came across one issue. If I am adding Events to one easelJs element then how can I ignore the right-click and only listen to left-click?

Click should work on a primary key but it is also working for other keys also. I have come across one scenario where pressUp of left-clicking is getting missed and that is creating an issue. steps are as follows:

  1. left mouseDown on the object.
  2. right mouseDown on the same object.
  3. right pressUp on the object.

If we follow this order, left pressUp is getting missed it is not getting fired nor it is present after that point. It's like it totally vanishes as if it never existed.

Can anyone please help me with this? Thank you in advance!!

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

I am kind confused with your question, but I think a easy way to ignore the right click event is to use event.preventDefault for contextmenu.

The preventDefault() method of the Event interface tells the user agent that if the event does not get explicitly handled, its default action should not be taken as it normally would be.

For example (you may not able to show the right click menu in the example):

document.addEventListener('contextmenu', function() {
  event.preventDefault();
  return false;

})

about 4 years ago · Juan Pablo Isaza Denunciar
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