is(":focus") always returning true
<p>I've asked <a href="http://stackoverflow.com/questions/12841350/raise-different-events-if-a-textbox-is-focused-or-not">this question</a> because of something I need to and I'm having some problems with jQuery. So I'm opening this question 'cause others may have this too.</p>

<p>In the answer posted in my other question, the user Felix tells me to do something like this:</p>

<pre><code>$(document).keypress(function(e) {
    e.preventDefault();

    if(e.which == 13 ) {
        if($("#searchInput").is(":focus")) {
          alert("search form submitted");
          return false;
        } else {
          alert("save form submitted");                  
          return false;
        }
    }
});
​
</code></pre>

<p>That seems to be what I need, however, the condition <code>if($("#searchInput").is(":focus"))</code> is <strong>always</strong> returning True, no mather what control is focused.</p>

<p>Anyone has a clue why this might be happening or any other way I could do this?</p>
