-1

I am trying to disable right click on my website. I tried with:

<body oncontextmenu="return false">

But it doesn't work in Brave browsers, in other browsers it look to work. Does anyone know why, and how can I disabling right click in all browser?

miel
  • 1
  • 4
    Does this answer your question? [How do I disable right click on my web page?](https://stackoverflow.com/questions/737022/how-do-i-disable-right-click-on-my-web-page) – luxdvie Aug 29 '22 at 16:02

1 Answers1

0

This question will solve your problem, How do I disable right click on my web page?.

I tested it in Brave with this fiddle. https://jsfiddle.net/dnuLcoh7/

document.addEventListener('contextmenu', event => event.preventDefault());
luxdvie
  • 902
  • 8
  • 16
  • it doesn't work for me in brave. I use 1.42.97 version. – miel Aug 29 '22 at 17:35
  • @miel I just tested the jsfiddle in 1.42.97 and it works for me. I tested on MacOS with a trackpad and Windows with a mouse. You will need to provide more clear code examples and descriptions of what you're doing for us to help you. – luxdvie Aug 30 '22 at 18:51