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

204
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
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