This is a very minor annoyance but an annoyance nevertheless. If I start editing any post on Stack Overflow, there is a "cancel" link next to "Save Edits". Clicking it works just fine. However, tabbing to it and pressing Enter doesn't trigger it (interestingly, it works correctly on Meta). Which is strange given that Stack Overflow seems to be using jQuery.click()
to attach the event handler to this link. My browser is Firefox 8 on Windows 7. Also verified the issue in Firefox 11.0a1 with a different profile and Chrome 16 so it isn't a configuration problem.
I tried reproducing with this code:
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
$(document).ready(function()
{
$("a").click(function()
{
alert("click");
});
});
</script>
<a href="#">test</a>
But my link can be triggered both with mouse clicks and Enter.
Edit: I realize that pressing Esc will have the desired effect. But sometimes tabbing to the actual control comes more natural.