title: Preventing default context menu on longpress / longclick in mobile Safari (iPad / iPhone)
body: <p>For a website I want to show a custom context menu when a user "longpresses" the screen. I've created a <a href="https://github.com/pisi/Longclick" rel="noreferrer">jQuery Longclick</a> listener in my code to show a custom context menu. The context menu is displayed, but the iPad's default context menu is also displayed! I tried to prevent this by adding a <a href="http://api.jquery.com/event.preventDefault/" rel="noreferrer"><code>preventDefault()</code></a> to the event in my listener, but this does not work:</p>
  
  <pre><code>function showContextMenu(e){
    e.preventDefault();
    // code to show custom context menu
  }
  
  $("#myId").click(500, showContextMenu);
  </code></pre>
  
  <p><strong>Questions</strong></p>
  
  <ol>
  <li>Can you prevent the iPad's default context menu to show?</li>
  <li>Can it by done using the jQuery Longclick plugin?</li>
  </ol>
  
  <hr>
  
  <p>The Longclick plugin has some specific handling for the iPad (assuming by this snippet of <a href="https://github.com/pisi/Longclick/blob/master/jquery.longclick.js" rel="noreferrer">it's source code</a>):</p>
  
  <pre><code>if (!(/iphone|ipad|ipod/i).test(navigator.userAgent)){
    $(this)
    .bind(_mousedown_, schedule)
    .bind([_mousemove_, _mouseup_, _mouseout_, _contextmenu_].join(' '), annul)
    .bind(_click_, click)
  }
  </code></pre>
  
  <p>So I assume this answers my second question (assuming the plugin used the correct event).</p>