Primary eng (and PM) emails
Spec
http://www.whatwg.org/specs/web-apps/current-work/#context-menus
http://www.whatwg.org/specs/web-apps/current-work/#the-menu-element
Summary
Implement contextmenu attribute which gives a mechanism to specify custom context menu for a particular element. The value of the contextmenu attribute must be the ID of menu element with type popup.
Motivation
- Allow web developers to define custom context menu for an element.
- Context menus are handy on touch based devices where DnD conflicts with scrolling.
- This will give web apps a whole new dimension.
Compatibility Risk
Mozilla is currently shipping this.
Demo at
http://people.mozilla.org/~prouget/bugs/context-menu-test/test.html
Ongoing technical constraints
None.
Will this feature be supported on all five Blink platforms (Windows, Mac, Linux, Chrome OS and Android)?
Yes.
OWP launch tracking bug?
http://code.google.com/p/chromium/issues/detail?id=87553
Row on feature dashboard?
No
Requesting approval to ship?
No
On Tue, 4 Feb 2014, Dimitri Glazkov wrote:<div contextmenu="menuid"> ... </div>
>
> FWIW, my first reaction was different from Adam's. I immediately
> thought: what is the API that HTMLElement uses to open a context menu in
> response to the long-press? But hey, I am a layer guy :)
<menu id="menuid" type=popup>
<menuitem label="Hello World" onclick="...">
</menu>
Long-pressing (or right-clicking) on the <div> now shows the "Hello World"
item, either in place of, or in addition to, the UA menu (that's up to the
UA -- probably in place of, with a UI affordance for getting to the
default menu if the user needs it).
That's true on desktop, but it's much less true on mobile. In android.View, for example, a context menu is just a normal Java class that you can implement yourself.
Adam
On Apr 10, 2014 12:37 PM, "Ian Hickson" <i...@hixie.ch> wrote:
>
>
> On Thu, 10 Apr 2014, Adam Barth wrote:
> > > Context menus can't be implemented at the framework level either, if
> > > they're implemented in a way that integrates with the native context menus
> > > of the platform (which is the purpose of <menu>).
> >
> > That's true on desktop, but it's much less true on mobile. In
> > android.View, for example, a context menu is just a normal Java class
> > that you can implement yourself.
>
> Sure. The Web exists on both, though.
We're vastly more interested in investing in making the mobile web a compelling platform for developers than in making marginal improvements on desktop.
Adam
I suspect you and Ian meant different things by "framework". Clearly
Chrome can implement contextmenu on Android, but jQuery couldn't
because at least 3 items in the native mobile context menu (open in
incognito, copy link text, and copy link address) are privileged
operations not available to javascript.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
Chrome is correct, "popup" the required type value. Firefox, as usual, is ignoring the specification :)
Mozilla are taking their sweet time as usual :D
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
| <menuitem> | THIS TEXT SHOULD NOT BE VISIBLE | </menuitem> This is an invalid markup. <menuitem> can't have children.
Specification: https://html.spec.whatwg.org/multipage/forms.html#the-menuitem-element
On Mon, 08 Dec 2014 14:16:51 +0100, <tobias....@gmail.com> wrote:
...
I'd rather we did not support both keywords. In my opinion, if there is too much Web context expecting 'context' to work, we should change the spec to use that keyword. Otherwise, we should only support 'popup'. As far as I know, we don't have any data yet.
There shouldn't be any live commercial content relying on this feature yet because, according to caniuse.com, Firefox is the only browser that actually exposes it. A few personal sites may be using it but I think it's safe to class those as edge cases.I would stick with the currently spec'd name, i.e. "popup".
There shouldn't be any live commercial content relying on this feature yet because, according to caniuse.com, Firefox is the only browser that actually exposes it. A few personal sites may be using it but I think it's safe to class those as edge cases.I would stick with the currently spec'd name, i.e. "popup".
Primary eng (and PM) emails
Spec
http://www.whatwg.org/specs/web-apps/current-work/#context-menus
http://www.whatwg.org/specs/web-apps/current-work/#the-menu-element
Summary
Implement contextmenu attribute which gives a mechanism to specify custom context menu for a particular element. The value of the contextmenu attribute must be the ID of menu element with type popup.
Motivation
- Allow web developers to define custom context menu for an element.
- Context menus are handy on touch based devices where DnD conflicts with scrolling.
- This will give web apps a whole new dimension.
- Firefox implements this. http://people.mozilla.org/~prouget/bugs/context-menu-test/test.html looks good on mobile FF.
Compatibility Risk
Mozilla is currently shipping this.
Demo at
http://people.mozilla.org/~prouget/bugs/context-menu-test/test.html
Ongoing technical constraints
None.
Will this feature be supported on all five Blink platforms (Windows, Mac, Linux, Chrome OS and Android)?
Yes.
OWP launch tracking bug?
http://code.google.com/p/chromium/issues/detail?id=87553
https://bugs.webkit.org/show_bug.cgi?id=58454Row on feature dashboard?
No
Requesting approval to ship?
No
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
type="context" changed back to type="popup" -What is the status of this feature? Can you change it to support "popup" instead?What is keeping you from posting an intent to ship?
Hmm, Sanjoy didn't respond in this thread.