Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removal of context menus spec also removed possibility contextmenu event bypass #6433

Open
pheki opened this issue Mar 3, 2021 · 3 comments

Comments

@pheki
Copy link

pheki commented Mar 3, 2021

The commit that removed the <menuitem> element (commit e7e8c88e, issue #2730) also removed the following paragraph:

User agents may provide means for bypassing the context menu processing model, ensuring that
the user can always access the UA's default context menus. For example, the user agent could
handle right-clicks that have the Shift key depressed in such a way that it does not fire the
<code data-x="event-contextmenu">contextmenu</code> event and instead always shows the default
context menu.

Even though that was specifically about the context menu processing model, bypassing the context menu event and always showing the default context menu is a great UA feature, has been on the spec since the start (at least since the first commit on this repo, c3550d9), still used (at least on Firefox) and still useful (shift + right click is recommended here: https://support.mozilla.org/en-US/kb/about-picture-picture-firefox).

Would this behavior be considered to be re-added to the spec if adapted to another (appropriate) section?

Thanks!

@annevk
Copy link
Member

annevk commented Mar 3, 2021

That seems reasonable, though I realize we do not have any specification with a formal definition of the contextmenu event. It would be best to have this language alongside the place that defines when to dispatch it. I would have expected something in https://w3c.github.io/uievents/, but that only mentions it twice, referencing this standard.

@pheki
Copy link
Author

pheki commented Mar 9, 2021

I also found it described as Fired at elements when the user requests their context menu in the (non-normative) Events index of this spec.

Maybe I should open an issue on the uievents W3C repository, to document contextmenu? Should it also be documented here? I'm not sure how both standards interact and differ.

@annevk
Copy link
Member

annevk commented Mar 9, 2021

If you can file an issue there that would be good. That does seem like a good place to define the processing model for firing it as it should also define firing of mouse events and the like. (The idea is that UI events defines a bunch of infrastructure around user input and how that translates into tasks and events, but it does very little of that thus far unfortunately.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants