javascript - How can I prevent a browser from generating ContextMenu event for a long touch
问题描述
Browsers support touch events and might generate mouse events. Also, for a long touch the browser generates a ContextMenu event. However, in my industrial environment, I want all touch events to be handled like a click event. Is there a global setting to prevent the browser to generate context menu events? Or can I at least set the time when the browser will generate such an event?
My only solution I came up with so far is the subscribe to click and context menu events and call the same handler. However I would rather avoid this for every button in my application...
Any ideas?
解决方案
推荐阅读
- firebase - 如何使用 Firebase-Cli 以编程方式为我的项目创建托管站点?
- angular - 从 Angular 6 类型错误升级 Angular 7
- java - 使用 QueryDSL 在两个不同的字段中搜索一个值
- php - 页面加载超时,刷新-codeigniter
- c++ - 将 CMake 配置为仅运行 scons,而不构建任何东西
- php - 单击提交输入按钮时如何在PHP中下载文件
- powerbi - 将 Power BI 与 OLAP 多维数据集一起使用
- android - 使用活动别名运行代码时出现安装错误
- spring - 使用 Spring Boot 进行测试批处理
- r - 在 R 中运行 1000 个置换测试以进行相关性