Bug 50555

Summary: implement the HTML5 "context menu" feature (contextmenu attribute)
Product: WebKit Reporter: sideshowbarker <mike>
Component: WebCore Misc.Assignee: Nobody <webkit-unassigned>
Status: RESOLVED WONTFIX    
Severity: Normal CC: ahmad.saleem792, ap, bfulgham, bronislav.klucka, bugs, code.vineet, donggwan.kim, dvpdiner2, elijahel, eoconnor, fwj834, ian, jan.varga, jonas, mamacdon, mounir, peter, rniwa, syoichi, webmaster, xqb748
Priority: P2 Keywords: HTML5
Version: 528+ (Nightly build)   
Hardware: PC   
OS: OS X 10.5   
URL: http://dev.w3.org/html5/spec/interactive-elements.html#context-menus
Bug Depends on:    
Bug Blocks: 32934    

Description sideshowbarker 2010-12-06 00:51:51 PST
In the HTML5 spec, section 4.11.4.3, "Context menus", specifies a mechanism for allowing author-developers to define a custom context menu for a particular element. The mechanism enables author-developers to define the context menu declaratively, through markup, by using a "contextmenu" attribute whose value is the ID of a particular menu element in the same document.

http://dev.w3.org/html5/spec/interactive-elements.html#context-menus
Comment 1 sideshowbarker 2011-08-09 05:18:25 PDT
Mozilla are working on an implementation of this that looks like it will land soonish

https://bugzilla.mozilla.org/show_bug.cgi?id=617528
Comment 2 Jan Varga 2011-08-09 05:44:14 PDT
Actually the basic implementation has already landed.
FYI, the supported syntax differs a bit:

<menu type="context">
  <menuitem label="Foo"></menuitem>
</menu>

if you're interested, we can provide more details ...
Comment 3 Olli Pettay (:smaug) 2011-08-09 05:49:25 PDT
And plenty of spec bugs have been filed to fix menu/command API.
Comment 4 Antaryami Pandia 2011-09-19 01:36:12 PDT
(In reply to comment #2)
> Actually the basic implementation has already landed.
> FYI, the supported syntax differs a bit:
> 
> <menu type="context">
>   <menuitem label="Foo"></menuitem>
> </menu>
> 
> if you're interested, we can provide more details ...

We have started working on html5 menu item (https://bugs.webkit.org/show_bug.cgi?id=58454) and also be working on context menu.

So can you please share the overall architecture/design documents.Also it will be good if the same can be posted as a webkit blog and/or on a webkit-dev list.That way other people can also share thoughts.
Comment 5 Jan Varga 2011-09-20 01:48:51 PDT
Ok, I'll put together some info for you...

The most import thing is that our implementation doesn't use the command API to generate custom context menu items and that we added a new element <menuitem>.

In the meantime you can check out the patch:
https://bug617528.bugzilla.mozilla.org/attachment.cgi?id=551436
Comment 6 Antaryami Pandia 2011-09-25 22:31:25 PDT
(In reply to comment #5)
> Ok, I'll put together some info for you...
> 
> The most import thing is that our implementation doesn't use the command API to generate custom context menu items and that we added a new element <menuitem>.
> 
> In the meantime you can check out the patch:
> https://bug617528.bugzilla.mozilla.org/attachment.cgi?id=551436

Thanks for info.
Is there any plan to push these new element/changes to spec?
Comment 7 Jan Varga 2011-09-25 22:50:47 PDT
(In reply to comment #6)
> Thanks for info.
> Is there any plan to push these new element/changes to spec?

the discussion is still ongoing

http://www.w3.org/Bugs/Public/show_bug.cgi?id=13608
Comment 8 Jan Varga 2011-11-21 03:56:07 PST
hey, if you're still working on it, could you comment in the w3c <menuitem> bug ?
http://www.w3.org/Bugs/Public/show_bug.cgi?id=13608
Comment 9 Antaryami Pandia 2011-11-22 01:37:17 PST
of late our priorities has been changed.so I am not actively working on this now.

As for <menuitem> is considered, I feel it's better to know the opinion of larger webkit community.
Comment 10 Bronislav Klucka 2012-07-13 09:02:43 PDT
any news here?
Comment 11 Elijah El-Haddad 2013-11-26 13:42:52 PST
I'm currently working on an open source Web IDE (Eclipse Orion) and having this feature across all browsers would be very beneficial to us.

Any plans to complete the implementation?
Comment 12 Ahmad Saleem 2022-07-31 05:23:40 PDT
<menuitem> is marked as obsolete: https://html.spec.whatwg.org/multipage/obsolete.html#non-conforming-features

https://github.com/whatwg/html/pull/2742

Blink also dropped it here:

https://chromium.googlesource.com/chromium/src.git/+/e90a0487386316a1e97f69159f20fbe5933cb3b9

Gecko dropped it here:

https://bugzilla.mozilla.org/show_bug.cgi?id=1372276

______

I think we can mark this as "RESOLVED WONTFIX". Thanks!
Comment 13 Ryosuke Niwa 2022-07-31 11:14:10 PDT
Yup, won't fix at this point.