When preventing Enter key to submit AJAX form focus on next input isn't working
<p>A small problem which I can't find a solution for (maybe I googled with wrong keywords):</p>

<p><strong>The situation:</strong></p>

<p>I prevent a form being submitted by hitting the Enter Key (13). 
To be noted that the form will be submitted by AJAX, <strong>therefore there will be no page reload.</strong></p>

<p>Preventing the Enter Key is a simple task and it works: </p>

<pre><code>$(document).on('keypress', 'input', function (e) {
    if (e.which === 13) {
        return false;
    }
});
</code></pre>

<p><strong>The problem:</strong></p>

<p>The focus on the next input is not working <strong>because of the <code>return false</code></strong>.</p>

<p>If I omit the <code>return false</code> part, naturally the form is submitted by AJAX  <strong>and the <code>focus()</code> is working.</strong></p>

<pre><code>$(document).on('keypress', 'input', function (e) {
    if (e.which === 13) {
        // Simplifying the selector of the next input
        // because this isn't the problem
        $(this).next().focus();
        return false;
    }
});
</code></pre>

<p>Any ideas on how to solve that?</p>