# How to Disable Right Click in the Internet browser

**URL:** <https://discourse.processing.org/t/how-to-disable-right-click-in-the-internet-browser/10211>\
**Category:** Coding Questions\
**Created:** [April 12, 2019, 12:28pm UTC](https://discourse.processing.org/t/how-to-disable-right-click-in-the-internet-browser/10211 "2019-04-12T12:28:08Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![kll](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/kll/32/964_2.png) [@kll](https://discourse.processing.org/u/kll)\
**Post date:** [April 12, 2019, 12:33pm UTC](https://discourse.processing.org/t/how-to-disable-right-click-in-the-internet-browser/10211/2 "2019-04-12T12:33:32Z")

</div>

he found it:

> [@Using right mouse -- without context menu?](https://discourse.processing.org/t/using-right-mouse-without-context-menu/9379/3):
>
> was the thread. a friend helped gave me the following to add to sketch. document.oncontextmenu = function() { return false; } working good now, thanks for replying. I think it should be added to the reference as the potential defaults issue was hinted at but the given examples didnt work in my case, though fundamentally the same code. i am using web editor. I can post link to code later if you think ive found a glitch. #noobCoder smiley thanks

example

> **[p5.js Web Editor](https://editor.p5js.org/kll/sketches/u6C9vjBLX)**
>
> A web editor for p5.js, a JavaScript library with the goal of making coding accessible to artists, designers, educators, and beginners.

---

_[View the full topic](https://discourse.processing.org/t/how-to-disable-right-click-in-the-internet-browser/10211)._
