7

This page says that IE9 and Opera 11.6 support the context-menu cursor on Windows, but I know Chrome, Safari and Firefox do not support the context-menu cursor on Windows, it just shows the regular arrow in those browsers.

I simply cannot understand why they wouldn't support that cursor. It would be immensely useful, especially when it's supported in those browsers on Mac.

It's purpose is for when you want the user to know that you've placed a special function on an element that will be activated when you engage the context-menu trigger over that element. For windows, that's a right-click. (most likely to bring up a custom context-menu)

Obviously, everything has a context menu on the web, you can right click anywhere on a page and the generic context menu will appear. This cursor though, is meant for when you place your own special function on an element that will be activated by right-click(and whatever Macs have - a context-menu key?)

Does anyone know why this isn't supported on Windows by those three browsers, but it is on Mac in those three browsers?

General Grievance
  • 4,555
  • 31
  • 31
  • 45
android.nick
  • 11,069
  • 23
  • 77
  • 112

2 Answers2

5

On the "CSS cursor" page of the Mozilla Developer Network you can see:

A context menu is available under the cursor. In Gecko/Firefox not implemented on Windows, bug 258960 WONTFIX.

On this page you can read more about the bug, e.g.:

In native Windows applications, the cursor for areas with a shortcut menu has always been identical to the normal cursor. Using a custom cursor will achieve little apart from annoying people with a non-default normal cursor.

scessor
  • 15,995
  • 4
  • 43
  • 54
  • 1
    Since you forgot to answer the question "why," I'll quote from the Moz page: "In native Windows applications, the cursor for areas with a shortcut menu has always been identical to the normal cursor. Using a custom cursor will achieve little apart from annoying people with a non-default normal cursor." – Blazemonger Feb 20 '12 at 15:43
  • 2
    Also: 'The spec is a bit unclear on what the desirable rendering is: http://www.w3.org/TR/css3-ui/#cursor "The UA may treat unsupported values as 'auto'. E.g. on platforms that do not have a concept of a 'context-menu' cursor, the UA may render 'default' or whatever is appropriate."' – Blazemonger Feb 20 '12 at 15:44
3

To truly go cross browser / platform, you could use a custom cursor from a image url to display context menu cursor however you'd like.

For example, you apply the following CSS Rule:

cursor: url("https://i.stack.imgur.com/ygtZg.png"), auto;

Which looks like this:

Custom Context Menu

Here's a Demo in jsFiddle

Note: Even if you can solve any cross-platform rendering issues, you might want to consider whether you should use the context-menu cursor. It's is so rarely used that it may confuse users who see it, and context-menus themselves don't translate well to mobile deployments, which'll be a good chunk of most web-users.

Further Reading:

KyleMit
  • 30,350
  • 66
  • 462
  • 664