简体   繁体   English

为什么在Web应用程序中不再使用“右键单击”?

[英]Why isn't “right click” more used in web applications?

More and more applications are moving to the cloud: Google Docs for productivity apps, Meebo for instant messaging, Gmail for e-mails, Salesforce for CRM, etc. 越来越多的应用程序正在转向云:用于生产力应用程序的Google Docs,用于即时消息传递的Meebo,用于电子邮件的Gmail,用于CRM的Salesforce等。

Yet, I've noticed that, unlike their desktop counterparts, very few of those web apps leverage the mouse's "right click". 然而,我注意到,与桌面版本不同的是,很少有这些网络应用程序利用鼠标的“右键单击”。 Most of the time, when right clicking in a web app, I get the standard browser right click menu. 大多数情况下,当右键单击Web应用程序时,我会获得标准浏览器右键菜单。

I don't believe it has to do with technical implementation since modifying the right click menu is quite trivial in Javascript. 我不相信它与技术实现有关,因为修改右键菜单在Javascript中非常简单。

Is there an actual reason that I am missing? 我错过了一个真正的原因吗?

EDIT: The most popular reason seems to be that it's not what user expect . 编辑:最流行的原因似乎是它不是用户所期望的 Another mentioned reason was that some users disable Javascript - which is a valid answer -, but in our case , we can discard this possibility since we're talking about applications that require Javascript regardless of the right click option. 另一个提到的原因是一些用户禁用Javascript - 这是一个有效的答案 - 但在我们的情况下 ,我们可以放弃这种可能性,因为我们谈论的是需要Javascript的应用程序而不管右键单击选项。

Now, let me expand my question a bit: 现在,让我稍微扩展一下我的问题:

  • Do you think it should stay that way (do you really find the default browser right click menu useful) ? 你认为它应该保持这种方式(你真的发现默认的浏览器右键菜单有用)?
  • Would you like to see more application-specific right click menus where they could improve the user interface ? 您是否希望看到更多特定于应用程序的右键菜单,以改善用户界面?

大多数用户希望右键单击菜单显示浏览器上下文菜单,因此这样做是为了调出特定于应用程序的菜单并不是他们会尝试的。

Mac don't have a "right mouse button", likewise with a lot of touch screen phones etc. Mac没有“鼠标右键”,同样有很多触摸屏手机等。

Even on a windows application most normal users (not programmers or power users) don't think to right clicking when they wish to do something, if they have not learned it off by heart to do the given task they wish to do. 即使在Windows应用程序中,大多数普通用户(不是程序员或高级用户)在他们希望做某事时也不会想到右键单击,如果他们没有按照他们想要做的给定任务来学习它。

(Also right clicking on most web pages brings up a menu that a normal user does not understand, so they don't try it more then once.) (同样右键点击大多数网页会显示普通用户不理解的菜单,因此他们不会再尝试一次。)

So you always have to provide another way of doing the operation anyway. 所以你总是必须提供另一种方法来进行操作。

I believe a very valid approach to web applications is to still keep all the browser features enabled, such as back button, opening things in new tabs, bookmarking, changing font-sizes, and so on. 我相信一种非常有效的Web应用程序方法是仍然启用所有浏览器功能,例如后退按钮,在新选项卡中打开内容,添加书签,更改字体大小等等。

The browser's right-click context menu is something that I do not want to have taken away by an app. 浏览器的右键单击上下文菜单是我不想被应用程序带走的东西。

Now, when you start moving the web app out of the browser into its own window (turning it into a dedicated application, such as Fluid does, and I believe Chrome OS will), without URL bar and back button, then we can talk about the context-menu. 现在,当您开始将Web应用程序从浏览器移动到自己的窗口(将其转换为专用应用程序,例如Fluid,并且我相信Chrome OS将会),没有URL栏和后退按钮时,我们可以谈论上下文菜单。

It is not how people are used to work in their browser, you shouldn't change default behavior. 这不是人们习惯在浏览器中工作的方式,您不应该更改默认行为。 Users aren't expecting something to happen when they rightclick. 当用户右键单击时,用户并不期待发生某些事情。

只是为了完整性:Opera没有oncontextmenu并且没有简单的可能性来禁止右键单击上下文菜单。

As others have stated, this is due to history and what users are used to. 正如其他人所说,这是由于历史和用户习惯的原因。 But I guess this will be changing eventually, as web applications gain more and more importance; 但我猜这最终将会发生变化,因为Web应用程序越来越重要; currently web apps are "web pages" in a "web browser" app, which is quite weird, when you think about it. 目前网络应用程序是“网页浏览器”应用程序中的“网页”,当您考虑它时,这非常奇怪。 It's not the web browser that's the interesting thing any more, it's the web app. 网络浏览器不再是有趣的东西,它是网络应用程序。 Why should it run inside something called a "browser"? 为什么它应该在一个叫做“浏览器”的东西里面运行? At least it shouldn't be that prominent to the user, even if it may make sense technically. 至少它不应该对用户来说是显着的,即使它在技术上可能有意义。

Actually we're seeing this with Google Chrome. 实际上我们通过Google Chrome看到了这一点。 It's definitely way more minimalistic than anything that came before. 它绝对比以前的任何东西都更简约。 It's almost a "plain window to the Web". 它几乎是一个“通向Web的窗口”。

Giving javascript control over right-clicks gives you something like this: http://periodic.lanl.gov/elements/24.html . 通过javascript控制右键单击可以得到如下内容: http//periodic.lanl.gov/elements/24.html I really love this website, but its attempts to keep me from copying text or images (whatever it's trying to do) seriously interfere with my web usage patterns. 我真的很喜欢这个网站,但它试图阻止我复制文本或图像(无论它想做什么)严重干扰我的网络使用模式。 I always open things in other tabs. 总是在其他标签中打开东西。 I always the right click menu to access the "back" command. 总是右键单击菜单来访问“后退”命令。

It also irritates me to no end when some web site has a flash animation somewhere that steals my control key (so I can no longer Ctrl + Tab to flip to another tab. 当一些网站在某个地方窃取我的控制键时,它也让我感到恼火,因此我无法再按Ctrl + Tab切换到另一个标签。

My bottom line: web applications can't supersede the local computer's built in commands. 我的底线: Web应用程序不能取代本地计算机的内置命令。 If a web application starts taking over control keys, right clicks, etc., it has crossed the line between local and remote applications. 如果Web应用程序开始接管控制键,右键单击等,它已越过本地和远程应用程序之间的界限。 That is a very important line to keep crystal clear. 这是保持清晰的一条非常重要的路线。

Right click is an expert shortcut both in desktop apps and in the browser. 右键单击是桌面应用程序和浏览器中的专家快捷方式。 Expert love it, while non-experts ignore it or use it only by rote for specific situations without really understanding it (they probably only use it at all because some expert user told them to). 专家喜欢它,而非专家忽略它或仅在特定情况下使用它而不真正理解它(他们可能只使用它,因为一些专家用户告诉他们)。 That's okay. 没关系。 There's nothing wrong with providing something for experts only, either for a thick client or a web app. 为专家提供一些东西,无论是对于胖客户端还是Web应用程序,都没有错。 So, of course, web apps would be better if they included application-specific right click menus. 因此,当然,如果Web应用程序包含特定于应用程序的右键单击菜单,那么它们会更好。 They would also be better if they included accelerator keys for their commands, mnemonics for their pulldown menus, double-click for default actions, and drag and drop for selection, copying, and moving, while we're on the subject of supporting experts. 如果它们包括用于命令的加速键,用于下拉菜单的助记符,用于默认操作的双击,以及用于选择,复制和移动的拖放,它们也会更好,而我们在支持专家的主题上。

Let's be honest: The reason we don't do these things for experts is because we don't want to be bothered with the extra work, not out of some concern about confusing users with the unexpected. 说实话:我们不为专家做这些事情的原因是因为我们不想被额外的工作所困扰,而不是出于对意外混淆用户的担忧。 And that's a valid point: a typical web app is used less than a desktop app. 这是一个有效的观点:典型的网络应用程序使用的不如桌面应用程序。 “Expert” web app users are thus rarer –few use the web app enough to discover and use the expert features. 因此,“专家”Web应用程序用户很少使用Web应用程序来发现和使用专家功能。 So why devote resources to something to benefit so few users? 那么为什么要将资源投入到能够让很少用户受益的东西上?

Nonetheless, I want to encourage designers to have application-specific right click menus in their web apps. 尽管如此,我还是鼓励设计师在他们的网络应用程序中使用特定于应用程序的右键菜单。 It is necessary if you want your app to be as usable as a desktop equivalent. 如果您希望您的应用程序与桌面等效应用程序一样可用,则是必要的。 If you do have application-specific right click menus, follow these rules: 如果您确实有特定于应用程序的右键单击菜单,请遵循以下规则:

  • All right-click menu commands should be available through a separate means, such as a sidebar menu. 所有右键单击菜单命令都应通过单独的方式提供,例如侧边栏菜单。 With right-click being an expert shortcut, you need to provide non-experts access to the same functionality in a way they're used to. 通过右键单击是专家快捷方式,您需要以他们习惯的方式为非专家提供对相同功能的访问权限。 This rule is a standard (eg, MS Windows), despite the fact that browsers (eg, MS Internet Explorer) blatantly violate it. 该规则是标准(例如,MS Windows),尽管浏览器(例如,MS Internet Explorer)公然违反它。 This rule also addresses the concern of users who disable Javascript. 此规则还解决了禁用Javascript的用户的顾虑。

  • Do not remove browser right-click commands that are still relevant. 不要删除仍然相关的浏览器右键单击命令。 The user should still be able do things like save images on a page, copy a block of text, and open a link in a new tab. 用户应该仍然可以执行诸如在页面上保存图像,复制文本块以及在新选项卡中打开链接等操作。 In fact, you should try to preserve the order of the browser commands as much as sensible. 实际上,您应该尽可能地保持浏览器命令的顺序。 In general, follow the standards for menu item organization and order. 通常,请遵循菜单项组织和订单的标准。 This addresses the concern of the right-click menu being unexpected: As long as the same commands are there in pretty much the same order, it's no cost to the user who is used to right-clicking for the browser commands. 这解决了右键单击菜单出乎意料的问题:只要相同的命令存在于几乎相同的顺序中,用户右键单击浏览器命令就不会花费任何成本。

  • Use right-click menus consistently. 始终使用右键单击菜单。 Everything that can have application-specific commands should have those commands available by right-click. 可以使用特定于应用程序的命令的所有内容都应该通过右键单击来提供这些命令。 If users have to start guessing what does and doesn't have a right-click menu, they're just going to give up on it. 如果用户必须开始猜测什么有没有右键菜单,他们就会放弃它。 On the other hand, if they discover it for one item, it'll encourage them to try it elsewhere, and you want to reward that. 另一方面,如果他们发现一个项目,它会鼓励他们在别处尝试,你想要奖励它。

  • Encourage right-clicking by showing it used for application specific commands in your advertisements, demos, and documentation. 通过在广告,演示和文档中显示用于特定于应用程序的命令来鼓励右键单击。 You may also want to explicitly show drop-down arrows on your pages (maybe just on mouse-over) wherever app-specific right-click is available. 您可能还希望明确显示页面上的下拉箭头(可能只是鼠标悬停),只要特定于应用程序的右键单击可用。 Some expert users will discover your application-specific commands anyway because they right-click for browser commands, but in many situations, the browser right-click commands are so unhelpful even experts don't right click, so you may have to “push” it a bit. 一些专家用户无论如何都会发现你的应用程序特定的命令,因为他们右键单击浏览器命令,但在许多情况下,浏览器右键单击命令是如此无益,即使专家没有右键单击,所以你可能必须“推”它有点。

It's not what users expect. 这不是用户的期望。

It's also not particularly "discoverable": like old-school Flash web sites where you had to roll your mouse over a graphic to get the site to do something, right-clicking is not necessarily intuitive. 它也不是特别“可被发现”:像老式的Flash网站,你必须将鼠标滚动到图形上以使网站做某事,右键点击不一定是直观的。

You shouldn't fiddle with the right click because of aa little thing we call Best Practices! 你不应该因为我们称之为最佳实践的小事而摆弄右键! Don't take away my rights as a user to control my experience! 不要剥夺我作为用户控制我的体验的权利! I want my right click to do what right clicks do! 我希望我的右键单击做正确的点击操作!

The best practice is to make this sort of thing optional to the user. 最佳做法是使用户可选择这种东西。 If you want to modify this behavior, make it something users can control in their profile or in the application settings. 如果要修改此行为,请将其设置为用户可以在其配置文件或应用程序设置中控制的内容。

For example: 例如:

(click to enable)
[ ] Use super special awesome right-click menu 

此外,因为有些人可能没有双键鼠标(我正在看着你,苹果用户)。

It is due to a inconsistency between the concept of browsing (which is browser centric) and the use of a web-application (which is application centric, the browser being only the renderer). 这是由于浏览概念(以浏览器为中心)与使用Web应用程序(以应用程序为中心,浏览器仅为渲染器)之间的不一致。 The right click button would make sense in the second case, but as the web is made for browsing resources, this introduces an ambiguity it will probably never be solved. 在第二种情况下,右键单击按钮是有意义的,但由于Web是为浏览资源而设置的,这引入了一种可能永远无法解决的模糊性。

Kind of interesting, the fact that the most touted deficiency in macs is the single button mouse, and then the most used interface in the world, the web, is single-button centric. 有趣的是,Mac中最受欢迎的缺点是单按钮鼠标,然后是世界上最常用的界面,即网络,是以单按钮为中心的。

I see two reasons. 我看到两个原因。 First of all, people might have javascript turned off, today that might not be the biggest issue of all but it's been following developers since the dawn of web-dev. 首先,人们可能关闭了javascript,今天这可能不是最大的问题,但自从web-dev出现以来,它一直在关注开发人员。 Which brings us to the second reason, it's not what the users expect. 这带来了第二个原因,它不是用户所期望的。

If you were to talk to someone about usability on the web and you had "hidden" features which were only made visible on right-click(browser context menu popup), this would probably be counted as bad design just because most users aren't use to the idea that the web is evolving into something more than just links and left-clicks(navigation clicking). 如果您要与某人谈论网络上的可用性并且您具有“隐藏”功能,这些功能仅在右键单击时显示(浏览器上下文菜单弹出窗口),这可能会被视为糟糕的设计,因为大多数用户不是使用的想法是,网络正在演变成不仅仅是链接和左键单击(导航点击)。

Personally, the only time I would do it is if I wrote an app which ran inside a plug-in which emulated some sort of editor. 就个人而言,我唯一能做到的就是如果我编写了一个在插件中运行的应用程序,该插件模拟了某种编辑器。 Silverlight has this ability now, but I would use it sparingly. Silverlight现在有这种能力,但我会谨慎使用它。

当我在你的forst anwser中读到这是真的它会在上下文菜单中它可能会弄乱一些东西但是因为我疯了一个btoolbar thta浮动我的网站做任何你可以使用键盘快捷键所以我看到一个温和的厄运对于右键单击的未来,我今天在网站上看到了每个人的工具栏

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM