# 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:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![peachman](https://avatars.discourse-cdn.com/v4/letter/p/278dde/32.png) [@peachman](https://discourse.processing.org/u/peachman)\
**Post date:** [April 12, 2019, 12:28pm UTC](https://discourse.processing.org/t/how-to-disable-right-click-in-the-internet-browser/10211/1 "2019-04-12T12:28:08Z")

</div>

Hi all,

I am having a huge frustration with ‘right Clicking’ with P5 in the online editor. I have been looking about for a while and cannot find the answer.

Every time i ‘right click’ the options come up for chome, however i want to remove this so i can right click on boxes to get options up for what I am making? does anyone have the solution for this if there is one!

![image](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/4/41d3d6c90891a31b6d4fcc978c2e7e1a69fc69dd.png)

Thanks in advance,

Peachman

---

<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.

---

<div class="post-metadata">

**Author:** ![peachman](https://avatars.discourse-cdn.com/v4/letter/p/278dde/32.png) [@peachman](https://discourse.processing.org/u/peachman)\
**Post date:** [April 12, 2019, 12:38pm UTC](https://discourse.processing.org/t/how-to-disable-right-click-in-the-internet-browser/10211/3 "2019-04-12T12:38:00Z")

</div>

Thanks a lot!

Peachman
