Keypress and Keydown generate different behavior
<p>I am trying to create to popup div when pressing enter key, while the div contains a button (that I script to focus when it fired up) that will close the div when you press enter again. I receive the enter key from binding <code>keypress</code> and <code>keydown</code>, end up having different results.</p>

<p><strong>Binding 'keypress'</strong></p>

<p>Things work properly, with first enter key fires up a popup box and another enter key to dismiss the popup box.</p>

<p>Refer this <a href="http://jsfiddle.net/mochatony/SBxEH/1/" rel="nofollow">JSFiddle</a>.</p>

<p><strong>Binding 'keydown'</strong></p>

<p>This doesn't work correctly, as it fires up and dismiss the popup box immediately (which you won't see) with only one enter key.</p>

<p>Refer this <a href="http://jsfiddle.net/mochatony/SBxEH/" rel="nofollow">JSFiddle</a>.</p>

<p>My question is why would keydown generate odd behavior, it is like firing enter key twice for me, but the truth it wasn't. If I remove the button focus(), it will works correctly. That's puzzled me. </p>

<p>Tested with firefox and chrome.</p>
