-4

I want to be able to use a right-click in a single page (react) app. Every time I right click, the browser handles it instead of letting my app handle it. This seems to happen with Chrome and Safari. Is there a way to tell either browser to pass the right-click to the web app?

2
  • I believe the cited question doesn't answer the question because it addresses how to enable and deal with mouse clicks in a web app. My concern is that the right-click never gets to my web app and is caught by the browser itself. I expect there is a simple way to tell Chrome or Safari to not do this and let the right-click get to the app itself. Commented Jan 3, 2020 at 13:23
  • Were you looking for event.preventDefault(), which prevents the default context menu from opening Commented Mar 16, 2021 at 4:30

1 Answer 1

1

onContextMenu

Please refer to the official documentation to get a complete list of mouse events.

Sign up to request clarification or add additional context in comments.

3 Comments

I do not want the browser or OS itself to intercept the event and not pass it on.
Why was this question closed? It was not answered by the question cited. Whoever closed it did not clearly read my question.
The question is probably rather brief @SteveWebber. Can you explain - maybe in the comments under the question itself - why the proposed duplicate is not satisfactory. "Not answered by it" is in itself a rather brief explanation too. Three experienced users here took the opposite view - can you explain how they are mistaken?

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.