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

164
Views
How do I run code when right click is pressed?

I am trying to disable users of my html site from pressing right click. I already have a response to this prepared, but I cannot figure out how to run that code when someone presses right click. Does anyone know how to solve this? (I would prefer JavaScript, but I mean if it works it works)

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

document.addEventListener('contextmenu', event => event.preventDefault());

but why would you do this? Anyone can run your client side code through a debugger and work around it. Most people try to keep people from seeing their source code which is a futile attempt with the open nature of web browsers.

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!