作为开发人员如何禁用鼠标手势?

发布于 2024-08-23 08:44:41 字数 259 浏览 3 评论 0原文

我正在开发一个 Web 应用程序,我注意到鼠标手势在其上是多么令人恼火,那么,有没有办法禁用它们(尤其是 Firefox 和 Opera)?

编辑:似乎有些混乱。我正在开发一个基于 Web 的软件,该软件的界面具有复杂的操作和任务,例如鼠标选择、文件拖放、桌面和 Windows 资源管理器样式的文件系统。每当我尝试选择多个虚拟文件并移动它们时,鼠标手势就会应用并让我离开软件并导航到上一页或做其他令人讨厌的事情。我的项目不是一个网站,而是一个网络应用程序——鼠标手势对该项目来说是毒药。

I'm developing a web application and I noticed how irritating mouse gestures can be on it, so, is there a way to disable them (Firefox and Opera particularly)?

Edit: It seems there is some confusion. I'm developing a web based software that has an interface with such complex actions and tasks such as mouse selections, file drag and dropping, a desktop and a Windows Explorer -style filesystem. Whenever I try to select multiple virtual files and move them around, mouse gestures will apply and take me away from the software and navigate to the previous page or do something else nasty. My project is not a website, it's a web application -- mouse gestures are poison to this project.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

会傲 2024-08-30 08:44:42

你没有说你正在使用一个库,但这是一个用于检测手势的 jQuery 插件: http: //plugins.jquery.com/project/jGesture

查看源代码,看起来它取决于测量 b/t mousdown 和 mouseup 动作...很多数学。

Mozilla 提供了一些事件处理程序。 https://developer.mozilla.org/En/DOM/ Mouse_gesture_events 但上面有一个很大的非标准标记。

You don't say you're using a library, but this is a jQuery plugin to detect gestures: http://plugins.jquery.com/project/jGesture

Looking at the source code, looks like it depends on measuring the action b/t mousdown and mouseup ... lotsa math.

And Mozilla offers some event handlers.. https://developer.mozilla.org/En/DOM/Mouse_gesture_events but it has a big Non-standard stamped on it.

秋心╮凉 2024-08-30 08:44:42

礼貌的做法是告知用户,要充分利用您的网站,他们应该暂时禁用鼠标手势。

the polite thing to do would be to inform users that to take full advantage of your site, they should disable mouse gestures temporarily.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文