title: JQuery $(window).focusout issue
body: <p>The problem is, I'm making a program like a chat, that needs to know if the user has left the window, or changed to another window or tab, to allow other users see that the other user is not seeing the page right now.</p>
  <p>I thought the window event <code>focusout</code> would solve my problems, however, there are a few issues with it.</p>
  <p>First:<br />
  it does not fire only when the user leaves the window, if they focus on a input field then click anywhere else in the page, the event fires. Obviously that's intolerable.</p>
  <p>I managed, in Firefox, a way around that. On Firefox, when that happens, the browser fires the <code>focusout</code> event once. If you really leave the window however, it fires it twice. So, a little programming made the magic.</p>
  <p>Then came the second problem:<br />
  Chrome, and I believe other browser might behave the same, only fires <code>focusout</code> event once, no matter what you do. Leaving the window, changing focus from inputs to page, it's the same, so, my programming didn't worked there.</p>
  <p>Does anyone know a way to simulate the desired behavior? Or a way to make Chrome and other possible browser to behave like Firefox or whatever?</p>