Can I configure my browser to let my web app receive a right-click instead of the browser itself? [duplicate]

*爱你&永不变心* 提交于 2020-01-22 04:14:45

问题


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:


onContextMenu

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



来源:https://stackoverflow.com/questions/59543150/can-i-configure-my-browser-to-let-my-web-app-receive-a-right-click-instead-of-th

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!