我可以将浏览器配置为让我的Web应用接收右键单击而不是浏览器本身吗? [英] Can I configure my browser to let my web app receive a right-click instead of the browser itself?

查看:72
本文介绍了我可以将浏览器配置为让我的Web应用接收右键单击而不是浏览器本身吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我希望能够在单个页面(反应)应用中使用右键单击。每次我右键单击时,浏览器都会处理它,而不是让我的应用程序处理它。 Chrome和Safari似乎会发生这种情况。

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?

推荐答案

是否可以告诉任一浏览器将右键单击传递给Web应用? onContextMenu

请参阅官方文档以获取鼠标事件的完整列表。

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

这篇关于我可以将浏览器配置为让我的Web应用接收右键单击而不是浏览器本身吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆