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?
1 Answer
onContextMenu
Please refer to the official documentation to get a complete list of mouse events.
3 Comments
Steve Webber
I do not want the browser or OS itself to intercept the event and not pass it on.
Steve Webber
Why was this question closed? It was not answered by the question cited. Whoever closed it did not clearly read my question.
halfer
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?
event.preventDefault(), which prevents the default context menu from opening