title: See if ContentEditable div has focus
body: <p>I'm attempting to check whether or not a contenteditable div has focus, but I'm having some trouble.  Here's my code so far:</p>
  
  <pre><code>if ($("#journal-content:focus")) {
      alert("Has Focus");
  } else {
      alert("Doesn't Have Focus");
  }
  </code></pre>
  
  <p>The problem is, it's always returning "Has focus" even when it doesn't.  What's the best way to go about doing this?</p>
  
  <p><strong>Update:</strong> The reason for doing this is to see whether or not the cursor is in the desired location <em>before</em> inserting the new element. Otherwise, if the last place the user clicked was in the header, then when I restore the selection with Rangy and replace it with a new element, it ends up in the header.  I need a way to find out if the contenteditable div is focused/has the cursor in it, so if not, I'll simply append the element I'm inserting at the end.</p>
  
  <p><strong>Update 2:</strong> Here's a JSFiddle illustrating my problem: <a href="http://jsfiddle.net/2NHrM/">http://jsfiddle.net/2NHrM/</a></p>