[whatwg] Suggestion for HTML5 context menus

Jonas Sicking jonas at sicking.cc
Sun Oct 23 21:05:53 PDT 2011


On Sun, Oct 23, 2011 at 8:50 PM, Mark Callow <callow_mark at hicorp.co.jp> wrote:
> On 23/10/2011 08:35, Jonas Sicking wrote:
>
> We added support for this in firefox, so you can get the behavior you
> want there in the meantime (I forget what we called the attribute
> though).
>
> Is there a way for the user to access the regular context menu? I could
> imagine it being extremely irritating and even frustrating if one can't
> access familiar and useful items like "Copy link location", "Bookmark this
> page" or "Select all" because the author of some element on the page has
> decided to redesign the context menu.

That would be a decision that the UA can make. In firefox we have
forever had an option to control whether websites can disable the
built-in context menus or not. Traditionally that has been hooked up
to the contextmenu event. We now have the same pref hooked up to
honoring this new attribute as well.

Another option would be to "hide" the default context menu items in a
sub-menu rather than fully disable them.

There's several good choices here. All we need is for websites to be
able to signal that they want their options to replace ,rather than
add to, the default menu options. What the UA decides to do with that
information is a UI decision.

/ Jonas



More information about the whatwg mailing list