activeElement property of document object usage and behavior?
<p>activeElement property of the document object sets current element that has the keyboard focus.</p>

<p>But i see strange behavior:</p>

<p>If i put mouse over image/anchor, activeElement shows </p>

<pre><code>&lt;body&gt;
</code></pre>

<p>If i right click on anchor, activeElement shows </p>

<pre><code>&lt;a href=....
</code></pre>

<p>If i right click on image, activeElement shows </p>

<pre><code>&lt;body&gt;
</code></pre>

<p>Can someone please exaplain correct behavior?</p>

<p>I am using Firefox.</p>

<pre><code>console.log(document.activeElement);
</code></pre>
