Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

201
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!