title: JQuery UI click event fires twice on keypress
body: <p><strong>HTML</strong> </p>
  
  <pre><code>&lt;button id="clickMe" tabindex=0&gt;Click Me!&lt;/button&gt;
  </code></pre>
  
  <p><strong>JS</strong></p>
  
  <pre><code>$('#clickMe').button();
  $('#clickMe').click(function() {
      alert('hey');
  });
  
  $(document).keypress(function (e) {
      var key = e.keyCode ? e.keyCode : e.which;
      //detect when the user has hit enter
      if (key == 13) {
          //click the focused element
          $(document.activeElement).click();
      }
  });
  </code></pre>
  
  <p>Why does this alert fire twice when you hit <kbd>tab</kbd> to focus the button and <kbd>enter</kbd> for the keypress event, but only fires once when you click the button with the mouse?</p>
  
  <p><a href="http://jsfiddle.net/vq6cA/" rel="nofollow">Demonstration</a></p>
  
  <p><strong>EDIT</strong>:  <kbd>tab</kbd> + <kbd>enter</kbd> doesn't work at all in IE 10</p>