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

Consider the benefit to adding functionality to the contextual menu #603

Closed
chrisblakley opened this issue Mar 4, 2015 · 3 comments
Closed
Labels
Backend (Server) Related to the server-side (includes PHP, HTML, etc). 💭 Question / Research Additional research/discussion is needed to answer this question.

Comments

@chrisblakley
Copy link
Owner

chrisblakley commented Mar 4, 2015

http://stackoverflow.com/questions/24542224/how-does-the-mdn-website-change-the-context-menu

Currently only Firefox support (or Chrome with experimental flag enabled).
http://caniuse.com/#feat=menu

@chrisblakley chrisblakley added 💭 Question / Research Additional research/discussion is needed to answer this question. Frontend (Script) Related to the client-side JavaScript. labels Mar 4, 2015
@chrisblakley chrisblakley added this to the 3.0 Trifid milestone Mar 4, 2015
@chrisblakley chrisblakley added Backend (Server) Related to the server-side (includes PHP, HTML, etc). and removed Frontend (Script) Related to the client-side JavaScript. labels Mar 4, 2015
@chrisblakley
Copy link
Owner Author

chrisblakley commented Mar 17, 2015

Better example:

http://davidwalsh.name/html5-context-menu

<section contextmenu="mymenu">
  <!-- 
    For the purpose of cleanliness, 
    I'll put my menu inside the element that will use it 
  -->

  <!-- add the menu -->
  <menu type="context" id="mymenu">
      <menuitem label="Refresh Post" onclick="window.location.reload();" icon="/images/refresh-icon.png"></menuitem>
      <menu label="Share on..." icon="/images/share_icon.gif">
        <menuitem label="Twitter" icon="/images/twitter_icon.gif" onclick="goTo('//twitter.com/intent/tweet?text=' + document.title + ':  ' + window.location.href);"></menuitem>
        <menuitem label="Facebook" icon="/images/facebook_icon16x16.gif" onclick="goTo('//facebook.com/sharer/sharer.php?u=' + window.location.href);"></menuitem>
      </menu>
    </menu>
</section>

Here's the demo (currently works in Firefox): https://davidwalsh.name/demo/html5-context-menu.php

@chrisblakley
Copy link
Owner Author

Added example

@chrisblakley
Copy link
Owner Author

Looks like this is being removed from the spec: whatwg/html#2730

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Backend (Server) Related to the server-side (includes PHP, HTML, etc). 💭 Question / Research Additional research/discussion is needed to answer this question.
Projects
None yet
Development

No branches or pull requests

1 participant