Jquery $(document.activeElement).is(':focus') return false ? (in Firefox)
<p>By definition, document.activeElement should return the element with focus, but </p>

<pre><code>$(document.activeElement).is(':focus')
</code></pre>

<p>seems to return false sometimes. (Jquery 1.7.2 is Used)</p>

<p><a href="http://jsfiddle.net/yRQHB/1/" rel="nofollow">exemple in jsFiddle</a></p>

<p>The first time you display this fiddle, the result is true, then if you click on run button, the result become false.</p>

<p>Edit : This issue can be replicated in Firefox 15 and 10 on ubuntu.</p>

<p>Has someone an explanation on this behavior ?</p>
