40

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.

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.

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."?

ntownsend
  • 7,462
  • 9
  • 38
  • 35

17 Answers17

51

It's generally not a good idea:

Expectations

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.

Reliability

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.

The Exception

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.

Community
  • 1
  • 1
Shog9
  • 156,901
  • 35
  • 231
  • 235
  • 5
    You will see more and more web applications embrace right-clicking, because - of all possible options - it is the best way to provide selection-centric actions without introducing modes. More recent web apps, such as Google Docs and Yahoo Mail make extensive use of right-click. In applications (whether delivered over the web or not) users expect context-based menus. As browsers have gotten more consistent, it is easier to implement reliably. – Michael Mikowski Dec 14 '11 at 19:39
  • 1
    Google Docs *definitely* fits the description of "closely simulates the behavior of an existing and well-known desktop app". Not convinced Y!Mail does, though it certainly doesn't look/act like a web app either. Gotta confess... I didn't know Y!Mail used right-click until just now; wonder what I've been missing! – Shog9 Dec 14 '11 at 19:44
  • 2
    IMO, right-clicking is very discoverable, since it is a widely established convention, and is often the first thing a user will do with a selection. I am often frustrated by web apps that force me to jump through hoops to accomplish an action a simple right-click would have resolved. If it acts like a desktop actions, I would expect the right-click to be imminently discoverable. – Michael Mikowski Dec 14 '11 at 19:50
  • @Michael: jumping through hoops is *bad UX in general*, regardless of what form that "hoop" takes. That's why I emphasized the last line of this answer... Keep in mind, more and more folks are using devices where "clicking" on a web page element takes the form of *touching the screen* - even a seasoned MS-Office-jockey isn't necessarily going to think, "right click" in that context. – Shog9 Dec 14 '11 at 19:55
  • 4
    Right click = long press on touch devices. Notice Google maps also now offers right-click. I think your post was right on in 2009. Just now as we are cresting on 2012, it's time to reconsider. – Michael Mikowski Dec 14 '11 at 20:08
  • You should consider providing your own answer then... Note that while some mobile browsers do simulate a right-click event (or rather, a contextmenu event) in response to the long touch, it's *not* universal - depending on what you're targeting, it may be something you need to implement yourself (at which point, you might also be considering gestures). Regardless, the core issue is the same as with actual, desktop-based right-clicking: it won't be obvious, and shouldn't be used to "hide" commands unless you're introducing a UI specialized enough to tolerate a learning curve. – Shog9 Dec 14 '11 at 20:28
15

No, because it's simply not discoverable. Of course, this depends on the application, but likely users won't have a clue to right click.

When a user is on the Web ("the Internet") they expect to use one button. Think about all the Apple Mighty Mouse users who will have trouble using your site.

Easiest way to prove to your boss whether the idea will work or not: test on real users. You should be doing this anyway.

Ben
  • 1,022
  • 1
  • 11
  • 25
strager
  • 88,763
  • 26
  • 134
  • 176
  • 1
    Unfortunately if you don't develop applications that end up on store shelves you just as likely to get your objection dismissed and excused as a "training requirement". Who needs standards or intuitive behavior when you can just train your end-users to do it your way, right? *kidding* – STW Apr 22 '09 at 23:53
10

Google Docs is the only web-app where I appreciate any attempt at all to use right-click functionality; and they have it implemented spot-on.

Update: To clarify a bit, I think the implementation is great because Google Docs (the whole site/app) is very good at making you forget that you're in a web-browser.

One more thought: DON'T! Between IE6/7/8, Firefox 2/3, Chrome, Safari and the other lesser known browsers and versions it sounds like an nightmare to support across the board. Unless your user's number in the millions the testing alone is probably a good enough reason to avoid it.

STW
  • 44,917
  • 17
  • 105
  • 161
  • Could you describe in more detail how it's implemented to those of us who've never used Google Docs? – Calvin Apr 22 '09 at 23:46
  • Or how it's used so well you appreciate it? – strager Apr 22 '09 at 23:48
  • Just sign up for a GMail account and give Google Docs a whirl. Essentially the right-click opens a context-menu just like any office suite would provide. The only reason the right-click is intuitive is because Google Apps is a very good emulation of a Desktop App--you right click once you forget it's a web-app, and just about the time you realize what you've done and expect to see "View Page Source" you instead see a perfectly integrated context menu. – STW Apr 22 '09 at 23:50
3

Shog9's answer is the best direct answer to your question, but another reason to avoid contextual menus in web applications is that it is a golden opportunity to break away from the use of contextual menus.

Most Windows and *nix GUI applications rely heavily on contextual menus to implement a large part of their functionality. One reason that the Mac OS has traditionally been praised for high usability is that true menu options and toolbar elements have been favored over contextual menus, which quickly become a ghetto of nested lists (especially if other applications are allowed to embed functionality).

Web applications are a breath of fresh air to UI designers precisely because the interface must be usable and powerful without the use of the right click menus. Furthermore, casual users are surprisingly not put off by new UI paradigms in web applications, whereas experimentation on the desktop is often anathema.

The age of the in-browser application thus is a great opportunity for developers to rethink UI paradigms. Right click menus are a cop-out on the web.

guns
  • 10,550
  • 3
  • 39
  • 36
3

It depends on the type of app. I always thought this was a bad idea, but web apps are getting closer to desktop apps all the time. So I asked the master of usability (Nielsen) and surprisingly, he's all for right-clicks!

...high-skilled users are often disappointed when an application doesn't support right-click -- for example, if it's implemented in Flash and brings up the Flash player menu instead of contextually-appropriate application commands.

Mauricio Scheffer
  • 98,863
  • 23
  • 192
  • 275
2

Yes: you should have context menus. Actually, you don't have a choice. The browser is going to give you a right click menu but the only context will be for a web page. So when you click on an order line, say, the browser will offer you such actions as Back, Save As, View Source and Print. You may not be happy with these. So the question is: do you want to override these with something more suitable for the context? As web apps become more like desktop apps the answer will increasingly be yes.

PBL
  • 21
  • 1
2

Right click menus work well in web apps. As long as your users understand what is going on. There are several context menu implementations available. Outlook Web Access provides a context menu for working with email.

Jeremy
  • 6,580
  • 2
  • 25
  • 33
2

Since right click is used so rarely on websites I would say it's a bad idea and would not be considered "Best Practice".

If you do something different than almost all the sites on the internet then you are requiring your users to spend time learning your app/site.

Also, Mac users traditionally do not have 2 mouse buttons and not all mac users know how to "right click" by using the option click combo or whatever it is these days.

So I wouldn't do it unless you really have a valid case to do so.

Chad Grant
  • 44,326
  • 9
  • 65
  • 80
2

I've noticed FCKeditor has a right click context menu... it might make sense in this example, as the WYSIWYG editor is generally given to people with no HTML experience, and more Microsoft Word experience, and in that case, they expect the right click to do something to their text they're typing.

I would, generally, say it is bad practice though. Could a floating modal suffice?

alex
  • 479,566
  • 201
  • 878
  • 984
2

I am not taking a position over this, but...

If you decide do go on the right-click aproach, check out the YUI! framework.

They already have a context-menu implementation that is cross-browser compatible.

Daniel Silveira
  • 41,125
  • 36
  • 100
  • 121
2

If it's a web site, it's a bad idea. Users quickly get irritated with web sites that break their favourite browser's functionality. Don't do that :)

If it's a web application, it's not necessarily a bad idea, but you should still be cautious.

Consider whether:

  • the user is going to feel sufficiently immersed within your application that they're going to feel naturally inclined to want a context menu;
  • you're not just compensating for otherwise-poor UI design;
  • the browser's existing functionality makes sense within the context of your application.
  • uglybugger
    • 905
    • 9
    • 7
    1

    I think it is a bad idea to have a right click functionality.

    knut
    • 4,699
    • 4
    • 33
    • 43
    1

    It is not a good idea for normal web applications. I have seen it done in flash/silverlight "web" applications where the user has an expectation of being more like a "desktop" application.

    Anthony
    • 1,706
    • 2
    • 22
    • 46
    1

    I think it heavily depends on what type of app it is.

    For example, it makes sense in Google Spreadsheets - where the right-click acts more like Excel, and gives you options such as allowing you to copy the highlighted range of cells - you would not be able to do this with the regular right-click menu.

    But unless your webapp really calls for it, it's probably just going to annoy users.

    matt b
    • 138,234
    • 66
    • 282
    • 345
    1

    This would depend on the context. For a public web site, I would be against it. For a web application, especially an internal company application, I would be more accepting.

    As for apps that handle this well, one that comes to mind is the web version of Outlook. I use it on a regular bases to access company email, and I find the right-click menu functionality bery useful.

    JeremyDWill
    • 3,132
    • 21
    • 18
    1

    In general I don't aggree with "right click menu" in web app but if it is a must you have to add an alternative method working side by side with the context menu and don't depend on the user experience.

    Khaled Musaied
    • 2,513
    • 3
    • 25
    • 38
    0

    No, and it will never really work anyway since the user can prevent your attempts to over-ride it.

    Rob K
    • 8,757
    • 2
    • 32
    • 36