News for hackers. Stuff that matters.

Gmail is now overriding browser right-click to provide a custom contextual menu

This is a clear example of a design anti-pattern that often crops up with new Google interfaces.

There is no setting to turn it off, and it nukes the browser's standard right click contextual menu for opening links in new tabs and windows, copying urls, etc when clicking on messages.

Designers, please just stop with this kind of thing. It's not acceptable to change the behavior of a standard. fundamental browser interface in your site design.

( 13 comments | 23 points | on HN )
Re:Gmail is now overriding browser right-click to provide a ... by rhythmvs on Wednesday October 16, 2013 @04:54AM (#6558647)
They (designers) do it to keep you from sniffing their handycraft code with the inspector. (That’s a joke.)

The browser is no webpage-viewer-app any longer. Especially not when the “page” is actually a full-fledged webapp. As soon as an app begins to be an app viewer, it’s really become an OS. (At least the Web is the OS, and browsers implement the frontend layer.)

Imagine the right-click context menu on Windows or OSX would be the same, all times, in all apps. Not much “context”, no?

One could claim those browser right-click context menus hadn’t to be there at all: at least, they’ve been “polyfills” with generic defaults, awaiting the (right, contextual) functionality being implemented by the webapps themselves. Granted, they were useful, back when web pages were just static hypertext documents and browsers were mere html viewers.

Browsers will continue to play that schizofrenic role for some time, both as a document viewer, and as a UI renderer. But eventually we will need two separate “web surfing” apps.

This is also what’s going on, I guess, when you here people complaining about pervasive javascript, progressive enhancement, and their demand that all web “pages” must support their no-js browser plugins indifferently.

The Web is more than pages: we got webapps now.

Re:Gmail is now overriding browser right-click to provide a ... by ars on Wednesday October 16, 2013 @01:25AM (#6558159)
This is really the browsers fault, not the designers.

Right click is a useful way to interact with something, but it's unfortunate the browser only offers all or nothing.

Either have a browser context menu, or override it and have nothing.

We need a way to have both. I suggest the browser give the designer a fixed size box (size queryable at runtime) and the designer can put anything in there.

This box shows up together with the regular context menu, but with a special border to mark it as part of the page.

Re:Gmail is now overriding browser right-click to provide a ... by nickporter on Wednesday October 16, 2013 @04:26AM (#6558587)
That's just like, your opinion, man..

It's called a context menu for a reason. It is a menu that offers options based on your current context. If you think of gmail as an application and not just a website, it makes sense no?

That said, I think it would be better if the browser would expose an API that would let you manipulate the native context menu.

Re:Gmail is now overriding browser right-click to provide a ... by Jasper_ on Friday October 18, 2013 @06:30PM (#6574415)
Re:Gmail is now overriding browser right-click to provide a ... by nickporter on Saturday October 19, 2013 @05:59AM (#6575918)
Oh interesting, thanks for the link!
Re:Gmail is now overriding browser right-click to provide a ... by sp332 on Wednesday October 16, 2013 @01:16AM (#6558129)
In Firefox, head to about:config and find dom.event.contextmenu.enabled, double-click it to turn it off. That way it will show the normal context menu on top of any custom menus.
Re:Gmail is now overriding browser right-click to provide a ... by tkjchjtkcj on Wednesday October 16, 2013 @03:44AM (#6558491)
"it nukes the browser's standard right click contextual menu for opening links in new tabs and windows, copying urls, etc when clicking on messages."

That is incorrect. It only appears to work for the message list (where the browser context menu is not necessary anyhow) but in the message itself the right click works as usual.

Re:Gmail is now overriding browser right-click to provide a ... by d0m on Wednesday October 16, 2013 @01:25AM (#6558161)
I understand your point and would agree for most parts, but I'm not sure how standard is that behavior. I.e. Before seeing your message, I've never really right-clicked on anything.

Maybe to bring the web inspector on an element?

What I often do that is I see more and more not working is the ctrl+click to open a link in a new tab. Oh, actually, if I ctrl+click and it doesn't work, I will usually right+click and "open in a new tab".. So, yeah, if both doesn't work, then I won't be happy.

Re:Gmail is now overriding browser right-click to provide a ... by DharmaPolice on Wednesday October 16, 2013 @03:03AM (#6558404)
>Before seeing your message, I've never really right-clicked on anything.

Really? I find myself using the right-click context menu all the time; "Open Link in New Window", "Save Image", "Copy" and (appropriately enough) "Search Google for x" I use multiple times an hour during normal web usage. Yes, I use keyboard shortcuts for these things as well, but if I'm on the phone or drinking from a cup then some shortcuts are awkward.

Anyway, the most annoying thing about this sort of feature is that there's no obvious visual cues to help anticipate non-standard behaviour. I get the same mouse pointer icon when I hover over "Inbox", "Sent Items", etc that I do when hovering over my email subjects. Yet I get different behaviour when right-clicking either control. This makes for an unsatisfying user experience IMHO.

Re:Gmail is now overriding browser right-click to provide a ... by pestaa on Wednesday October 16, 2013 @03:00AM (#6558394)
I've been thinking about this for some time now. If the browser is really to become the common platform for most applications in the future, shouldn't they be able to declare whatever interaction they desire?

There are long articles on the internet why the right click is a suboptimal way to interact with anything on-screen, but users who need the contextual menu already learnt it. Can't we make those menus more useful?

Re:Gmail is now overriding browser right-click to provide a ... by RexRollman on Saturday October 19, 2013 @09:49AM (#6576390)
The real answer is to stop using Gmail. And probably Google products in general.
Re:Gmail is now overriding browser right-click to provide a ... by pattle on Wednesday October 16, 2013 @05:10AM (#6558685)
I actually like it
Re:Gmail is now overriding browser right-click to provide a ... by az on Wednesday October 16, 2013 @12:57AM (#6558083)
Agreed.