[whatwg] <menu> and friends

Jonas Sicking jonas at sicking.cc
Fri Jan 4 16:52:11 PST 2013

On Fri, Jan 4, 2013 at 3:34 PM, Tab Atkins Jr. <jackalmage at gmail.com> wrote:
> On Sat, Dec 29, 2012 at 10:17 AM, David Young <dyoung at pobox.com> wrote:
>> On Sat, Dec 29, 2012 at 01:23:20AM +0000, Ian Hickson wrote:
>>> On Sun, 23 Oct 2011, Eric Sh. wrote:
>>> >
>>> > I was trying out the HTML5 context menu in firefox and I saw that there
>>> > is no way(in the specs) to create an empty menu with only selected
>>> > context menu items in it.
>>> >
>>> > So for example if I have an image element and I want to create a context
>>> > menu with the items: "Rotate" and "Share" - I have to ask the browser to
>>> > "Add" them to the regular context menu along with the ten other items
>>> > that are already there.
>>> >
>>> > This makes a bulky context menu when I only need those two items and it
>>> > is especially hurtful for user experience if the context menu is close
>>> > to the bottom of the screen and is moved above the mouse cursor.
>>> >
>>> > I suggest adding a way to ask the browser to create a brand new context
>>> > menu with only those items.
>>> Not showing the browser's own context menu items is a hurtful user
>>> experience as well; indeed, possibly a worse one.
>> I agree that it's an awful experience, especially because it turns the
>> user's habits against them.  If the Nth item in the menu is ordinarily
>> the UA's "Copy Link Location" and an app removes or re-orders items so
>> that the Nth item changes to "Rotate", "Share", or "Delete," then users
>> are in for a surprise when they make the automatic "Copy Link Location"
>> gesture.
> Gah, strongly agree.  Simple example - I use "Back" constantly in the
> context menu, and would be really pissed if pages could easily kill
> that. I already get angry when I accidentally right-click a link and
> just select the first option without looking closely.

Can you elaborate on what you mean by "if" above. It's already the
case that pages can in all popular browsers.

Please note that none of the proposals here remove that option. Not
even the proposal from Ian.

> On Mon, Dec 31, 2012 at 12:54 AM, Jonas Sicking <jonas at sicking.cc> wrote:
>> What I was saying as a browser vendor is that I don't think that
>> authors are going to use this feature unless it provide the ability to
>> replace the existing context menu. Or at least almost entirely replace
>> it.
> I don't think I can agree with this.  This argument would be more
> believable if authors currently used pile-of-divs for context menus a
> lot, but I only rarely actually see it.  I think this is because it's
> just plain *hard* to do it even half-decently.  The extreme ease with
> which authors will be able to create high-quality context menus with
> <menu> will, I think, override a lot of the concerns.

I feel that I do see this quite often. maps.google.com, Google docs,
and Zimbra are three examples off the top of my head that I spend a
lot of time with.

I agree that the number of sites is relatively small. But for "app
like" sites, which I think people are spending more and more time in
as more things migrate to the web, it's not uncommon.

> That said, I've got no problem with something like "move all of the
> normal options to a submenu that's the first item in the menu".


/ Jonas

More information about the whatwg mailing list