在 Web 应用程序中单击鼠标右键:好主意还是坏主意? [英] Right mouse click in web applications: good or bad idea?

查看:32
本文介绍了在 Web 应用程序中单击鼠标右键:好主意还是坏主意?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前正在开发一个 Web 应用程序,上面的权限决定使用我们自己的特定于应用程序的右键单击菜单覆盖浏览器的右键菜单是可行的方法.

I'm currently working on a web application and the powers above have decided that overriding the browser's right-click menu with our own application-specific one is the way to go.

我完全不同意.我觉得当有人使用 Web 浏览器时,他们对使用指点设备的右键单击功能时会发生什么有一定的期望,而故意取代此功能而违反这些期望对用户来说非常令人不安(烦人?).

I totally disagree. I feel that when someone is using a web browser they have certain expectations about what should happen when they use the right-click functionality of a pointing device, and violating these expectations by purposefully supplanting this functionality is very disconcerting (annoying?) to the user.

你怎么看?您是否见过在 Web 应用程序中执行良好的右键单击?我的意思是,您实际上认为,是的,这个右键单击功能是一个很棒的决定."?

What do you think? Have you ever seen right-click done well in a web app? I mean in a way that you actually thought, "Yes, this right-click functionality was a great decision."?

推荐答案

这通常不是一个好主意:

It's generally not a good idea:

用户,尤其是高级用户,希望能够右键单击桌面应用程序中的元素,以获得特定于元素的操作菜单.Web 应用程序不存在这种期望 - 实际上,期望是在网页中单击鼠标右键将为您提供标准的网页菜单,您可以在其中进行打印、在新窗口中打开链接、查看源代码等.

Users, especially power users, expect to be able to right-click on elements in desktop applications in order to get a menu of element-specific actions. This expectation does not exist for web applications - indeed, the expectation is that right-clicking in a web page will give you the standard web-page menu where you can print, open links in new windows, view source, etc.

因为覆盖内置菜单的能力在过去被滥用(主要是由试图禁用保存图像的天真程序员),许多浏览器禁止它或使客户端代码难以以可靠的方式覆盖.

Because the ability to override built-in menus has been so abused in the past (mostly by naive programmers attempting to disable saving images), many browsers prohibit it or make it difficult for client code to override in a reliable fashion.

如果您正在创建一个网络应用程序来模拟现有且众所周知的桌面应用程序的行为,则可能适合于实施合理的右键单击菜单所需的工作.但是,您还应该遵循桌面应用中这些菜单的通常建议:使用它们来提供对特定于上下文的操作的快速访问,但还提供另一种访问相同功能的方法.

If you are creating a web app that closely simulates the behavior of an existing and well-known desktop app, it may be appropriate to put the effort in required to implement sensible right-click menus. However, you should then also follow the usual recommendation for these menus in desktop apps: use them to provide quick access to context-specific operations, but also provide another means of accessing the same features.

这篇关于在 Web 应用程序中单击鼠标右键:好主意还是坏主意?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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