Skip to content
This repository has been archived by the owner on Jul 30, 2019. It is now read-only.

HTMLElement.contextmenu is five-year old and nobody intends to implement it #589

Closed
kciray8 opened this issue Sep 15, 2016 · 6 comments · Fixed by #854
Closed

HTMLElement.contextmenu is five-year old and nobody intends to implement it #589

kciray8 opened this issue Sep 15, 2016 · 6 comments · Fixed by #854

Comments

@kciray8
Copy link

kciray8 commented Sep 15, 2016

HTMLElement.contextmenu is five-year old and many browsers still doesn't support it. Why? And maybe you should remove this attribute from HTML 5.1 specification as obsolete.

From Mozilla
image
image

@LJWatson
Copy link
Collaborator

We looked at the interoperability of contextmenu in #502 and found that is implemented in Gecko (Firefox) and Blink (Chrome), and also Blink (Opera) behind the flag. It therefore meets the interoperability requirements for remaining in HTML.

@SebastianZ
Copy link

As stated in issue #502, the feature is now only available via the command line parameter --enable-blink-features=ContextMenu in Blink-based browsers.

@kciray8 I've updated the browser compatibility information for the contextmenu attribute on MDN and added a page for the related HTMLElement.contextMenu.

Sebastian

@chaals
Copy link
Collaborator

chaals commented Oct 18, 2016

Let's watch this still, to make sure it gets better not worse.

Although it seems that the most serious web compatibility issue - a page at apple.com that used it incorrectly - has been fixed. In any event, it should be reviewed to determine whether it belongs in the at-risk category when 5.2 goes to CR, so I'll make and apply the labels for that.

@travisleithead travisleithead added this to the HTML 5.2 CR draft milestone Oct 24, 2016
@AndySky21
Copy link

This could appear as a minor issue, but I'd like to ask for it nonetheless.
Is there a chance that <menu> might remain in the spec in its missing-type-default state of toolbar? It would be semantically relevant for grouping javascript-backed commands to be used on a related object (e.g. an editable block, a textarea, a canvas) without requiring too much effort to support it. Authors could then use their own solutions to make it contextual if necessary, while waiting for a future implementation.
I don't know if many authors are concerned with standard compliance as I am. As of now, even the simplest use of this element is impossible because it could be removed at any time.

@chaals
Copy link
Collaborator

chaals commented Mar 6, 2017

@AndySky21, you wrote

Is there a chance that <menu> might remain in the spec in its missing-type-default state of toolbar

You can build javascript against anything, whether it's in the spec or not. But it's unlikely to stay there if there isn't a lot of evidence of implementation.

@chaals
Copy link
Collaborator

chaals commented Mar 30, 2017

Closing this issue in favour of dealing with the whole mess in #274

It's likely that we'll drop everything that isn't a contextmenu, and match that part of the spec to Firefox' implementation which seems pretty reasonable.

But even that part will be marked at risk for HTML 5.2 - although it is one of the top-20 most popular bugs for Chromium, it doesn't seem anyone will implement it within the 5.2 timeline…

@travisleithead ping

@chaals chaals closed this as completed Mar 30, 2017
@chaals chaals mentioned this issue Mar 31, 2017
edent added a commit that referenced this issue Mar 3, 2018
(I think I'm right about this...)

The `onshow` event handler was part of `contextmenu` - which was never implemented.

See:

* #589
* whatwg/html#2860

Re #1215
@edent edent mentioned this issue Mar 3, 2018
chaals pushed a commit that referenced this issue Mar 8, 2018
See also #1215

* Remove onshow
The `onshow` event handler was part of `contextmenu` - which was never implemented, see #589
* Fix CSP list warning
* Fix origin error
* Fix URL linking error
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants